Opened 12 years ago

Last modified 10 years ago

#10197 confirmed Bug

CKE 4.x Inline Can't disable object resizing — at Initial Version

Reported by: Sean Kelly Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0 Beta
Keywords: Cc:

Description

[I'm not going to spend too much time trying to get this thing to format nicely in your wiki - please edit as you see fit.]

In our application we use both the full editor and the inline editor in different contexts. With few exceptions we try to use the same configuration for both modes of the editor. On the full editor we can disable object resizing with the following addition to the config object that is passed to CKEDITOR.replace():

'disableObjectResizing' : true

When we use the inline editor we change the config properties adhoc and the same setting looks like:

editor.config.disableObjectResizing = true;

However when we are working on a document in the inline editor which has this setting active and an image within the document, clicking the image produces the 8 grippers around the perimeter and allows resizing. The inline editor does not appear to be respecting this configuration setting.

Here is what the relevant segment of our inline editor config looks like: <blockquote style="background-color: black; color: #CCCCCC;"> <code style="background-color: black; color: #CCCCCC;"> These get filled up with a function call<br/> var extraPlugins = [];<br/> var extraButtons = ;<br/> <br/> CKEDITOR.disableAutoInline = true;<br/> <br/> CKEDITOR.on( 'instanceCreated', function( event ) {<br/> <ul>

var editor = event.editor;<br/> editor.on( 'configLoaded', function() {<br/>

<ul>

editor.config.customConfig = ;<br/> editor.config.filebrowserImageUploadUrl = uploaderURI;<br/> editor.config.pasteFromWordRemoveFontStyles = false;<br/> editor.config.pasteFromWordRemoveStyles = false;<br/> editor.config.disableObjectResizing = true;<br/> editor.config.extraPlugins = extraPlugins.join();<br/> editor.config.toolbar = [<br/>

<ul>

['Undo','Redo'],<br/> ['NumberedList','BulletedList','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','Outdent','Indent'],<br/> ['PasteFromWord','SpellCheck'],<br/> ['Link','Image','Table','HorizontalRule'],<br/> '/',<br/> ['Bold','Italic','Underline','Strike','TextColor','BGColor','RemoveFormat'],<br/> ['Styles','Format','Font','FontSize'],<br/> extraButtons<br/>

</ul>

];<br/>

</ul>

});<br/>

</ul> });<br/> </code> </blockquote>

And this is the equivalent for the full editor: <blockquote style="background-color: black; color: #CCCCCC;"> <code style="background-color: black; color: #CCCCCC;"> CKEDITOR.replace(this.basename, {<br/> <ul>

'customConfig': ,<br/> 'disableNativeSpellChecker': false,<br/> 'browserContextMenuOnCtrl': true,<br/> 'width': '100%',<br/> 'height': '400px',<br/> 'filebrowserImageUploadUrl' : uploaderURI,<br/> 'toolbarStartupExpanded' : (hidetoolbar ? false : true),<br/> 'toolbarCanCollapse' : true,<br/> 'extraPlugins': extraPlugins.join(),<br/> 'disableObjectResizing' : true,<br/> 'pasteFromWordRemoveFontStyles' : false,<br/> 'pasteFromWordRemoveStyles' : false,<br/> 'toolbar_RCI' : [<br/>

<ul>

{ name: 'r1g1', items : [ 'Print', 'Source' ] },<br/> { name: 'r1g2', items : [ 'Undo', 'Redo'] },<br/> { name: 'r1g3', items : [ 'NumberedList', 'BulletedList', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'Outdent', 'Indent' ] },<br/> { name: 'r1g4', items : [ 'PasteFromWord', 'SpellCheck' ] },<br/> { name: 'r1g5', items : [ 'Link', 'Image', 'Table', 'HorizontalRule' ] },<br/> { name: 'r1g6', items : [ 'ShowBlocks', 'Maximize' ] },<br/> '/',<br/> { name: 'r2g1', items : [ 'Bold', 'Italic', 'Underline', 'Strike', 'TextColor', 'BGColor', 'RemoveFormat' ] },<br/> { name: 'r2g2', items : [ 'Styles', 'Format', 'Font', 'FontSize' ] },<br/> { name: 'r2g3', items : extraButtons }<br/>

</ul>

],<br/> 'toolbar' : 'RCI',<br/> 'on': {<br/>

<ul>

'instanceReady': function(event) {<br/>

that.callbackEditorLoaded(this);<br/>

},<br/> 'key': ( function () { that.eventListener(); } ),<br/> 'blur': ( function () { that.eventListener(); } ),<br/> 'saveSnapshot': ( function () { that.eventListener(); } ),<br/> 'afterCommandExec': ( function () { that.eventListener(); } ),<br/> 'insertHtml': ( function () { that.eventListener(); } ),<br/> 'insertElement': ( function () { that.eventListener(); } ),<br/> 'focus': ( function () { that.eventListener(); } )<br/>

</ul>

}<br/>

</ul> });<br/> </code> </blockquote>

Change History (0)

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy