diff --git a/src/rich_text_editor/config/config.js b/src/rich_text_editor/config/config.js index 3346a3f20..8bf8a5821 100644 --- a/src/rich_text_editor/config/config.js +++ b/src/rich_text_editor/config/config.js @@ -23,10 +23,10 @@ define(function () { }/*,{ command: 'fontSize', options: [ - {name: 'Huge', value: '100px'}, - {name: 'Normal', value: '14px'}, - {value: '5px'} + {name: 'Huge', value: '7'}, + {name: 'Normal', value: '5'}, + {value: '1'} ] - }*/], + }*/], }; }); \ No newline at end of file diff --git a/src/rich_text_editor/main.js b/src/rich_text_editor/main.js index 488071001..91906db86 100644 --- a/src/rich_text_editor/main.js +++ b/src/rich_text_editor/main.js @@ -4,13 +4,11 @@ * * [getAll](#getall) * * [remove](#remove) * + * This module allows to customize the toolbar of the Rich Text Editor and use commands from the HTML Editing APIs. + * For more info about HTML Editing APIs check here: + * https://developer.mozilla.org/it/docs/Web/API/Document/execCommand * - * styleWithCSS - * removeFormat - * - * - * This module allows to customize the toolbar of the Rich Text Editor. It's highly recommended - * to keep this toolbar as small as possible, especially from styling commands (eg. 'fontSize') + * It's highly recommended to keep this toolbar as small as possible, especially from styling commands (eg. 'fontSize') * and leave this task to the Style Manager. * * Before using methods you should get first the module from the editor instance, in this way: @@ -164,7 +162,7 @@ define(function(require) { * @private * */ show: function(){ - toolbar.el.style.display = 'block'; + toolbar.el.style.display = "block"; }, /** @@ -172,7 +170,7 @@ define(function(require) { * @private * */ hide: function(){ - toolbar.el.style.display = 'none'; + toolbar.el.style.display = "none"; }, /** diff --git a/src/rich_text_editor/view/CommandButtonSelectView.js b/src/rich_text_editor/view/CommandButtonSelectView.js index f7f0b6688..0e3ee8ed3 100644 --- a/src/rich_text_editor/view/CommandButtonSelectView.js +++ b/src/rich_text_editor/view/CommandButtonSelectView.js @@ -1,10 +1,9 @@ -define(['backbone'], - function (Backbone) { - return Backbone.View.extend({ +define(['backbone', './CommandButtonView'], + function (Backbone, CommandButtonView) { + return CommandButtonView.extend({ initialize: function(o, config){ - this.config = config || {}; - this.className = this.config.stylePrefix + 'btn ' + this.model.get('class'); + CommandButtonView.prototype.initialize.apply(this, arguments); }, getInput: function(){ @@ -13,6 +12,8 @@ define(['backbone'], var cmd = m.get('command'); var input = '