X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Feditor%2Fjs%2Feditor.formattedTextEditor.js;fp=web%2Fcore%2Fmodules%2Feditor%2Fjs%2Feditor.formattedTextEditor.js;h=3d74aaba0558698aebb997724c5d65470cde50ca;hp=299b60a729c8507c6f6f0fa734ada167f66b692b;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/editor/js/editor.formattedTextEditor.js b/web/core/modules/editor/js/editor.formattedTextEditor.js index 299b60a72..3d74aaba0 100644 --- a/web/core/modules/editor/js/editor.formattedTextEditor.js +++ b/web/core/modules/editor/js/editor.formattedTextEditor.js @@ -73,15 +73,17 @@ break; case 'active': - var textElement = this.$textElement.get(0); - var toolbarView = fieldModel.toolbarView; - this.textEditor.attachInlineEditor(textElement, this.textFormat, toolbarView.getMainWysiwygToolgroupId(), toolbarView.getFloatedWysiwygToolgroupId()); - - this.textEditor.onChange(textElement, function (htmlText) { - editorModel.set('currentValue', htmlText); - fieldModel.set('state', 'changed'); - }); - break; + { + var textElement = this.$textElement.get(0); + var toolbarView = fieldModel.toolbarView; + this.textEditor.attachInlineEditor(textElement, this.textFormat, toolbarView.getMainWysiwygToolgroupId(), toolbarView.getFloatedWysiwygToolgroupId()); + + this.textEditor.onChange(textElement, function (htmlText) { + editorModel.set('currentValue', htmlText); + fieldModel.set('state', 'changed'); + }); + break; + } case 'changed': break;