diff --git a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js index dc0a7f792..6339118fc 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js +++ b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js @@ -25,6 +25,8 @@ } RichEditor.DEFAULTS = { + stylesheet: null, + fullpage: false } RichEditor.prototype.init = function (){ @@ -40,12 +42,21 @@ /* * Initialize Redactor editor */ - this.$textarea.redactor({ - iframe: true, - css: this.options.iframeCss, + var redactorOptions = { focusCallback: function() { self.$el.addClass('editor-focus') }, blurCallback: function() { self.$el.removeClass('editor-focus') } - }); + } + + if (this.options.stylesheet) { + redactorOptions.iframe = true + redactorOptions.css = this.options.stylesheet + } + + if (this.options.fullpage) { + redactorOptions.fullpage = true + } + + this.$textarea.redactor(redactorOptions) } // RICHEDITOR PLUGIN DEFINITION diff --git a/modules/backend/formwidgets/richeditor/partials/_richeditor.htm b/modules/backend/formwidgets/richeditor/partials/_richeditor.htm index 7dd506109..302b2378a 100644 --- a/modules/backend/formwidgets/richeditor/partials/_richeditor.htm +++ b/modules/backend/formwidgets/richeditor/partials/_richeditor.htm @@ -4,7 +4,8 @@