Ticket #5093 (confirmed New Feature)

Opened 5 years ago

Last modified 4 years ago

In-page settings cannot be passed to replaceAll

Reported by: tony Owned by:
Priority: Normal Milestone:
Component: General Version: 3.1
Keywords: Cc:

Description

I quote from the manual : "In-page settings can be passed to any of the editor instance creation functions, namely CKEDITOR.replace and CKEDITOR.appendTo."

http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations

I use :

function ckeditorInit() {

    if (editor) /* If we already have an editor, let's destroy it first. */
    editor.destroy(true);
	CKEDITOR.replaceAll( 'rich-text', {
	    customConfig : '',
	    enterMode : CKEDITOR.ENTER_BR,
	    shiftEnterMode : CKEDITOR.ENTER_P, // Paragraphs are now made by pressing shift and enter together
	    skin : 'office2003', editor */
	    toolbar : [
		['Preview', '-', 'Cut','Copy','Paste', 'Find', 'Undo','Redo', '-','SelectAll','RemoveFormat', 'Table','HorizontalRule','PageBreak', 'ShowBlocks', '-', 'Templates', '-', 'Styles','Format', '-', 'Font','FontSize'],
		'/',
		['Bold','Italic','Underline','Strike', 'SpecialChar', 'TextColor', '-','SpellChecker', 'Scayt', '-', 'NumberedList','BulletedList','-','Outdent','Indent','Blockquote', '-', 'JustifyRight','JustifyCenter','JustifyLeft', 'JustifyBlock', '-', 'Link','Unlink','Anchor', '-', 'Image','Flash', 'Smiley', 'BGColor', '-', 'NewPage', '-', 'Source', '-', 'Maximize'],
	    ]
	}); /* End CKEDITOR replaceAll rich-text */


};

window.onload = ckeditorInit;

All the textareas are replaced with ckeditor but the config is ignored.

So, In-page settings cannot be passed to any of the editor instance creation functions. Just some of them and not CKEDITOR.replaceAll.

Please sort this out. It's what most people would expect as "Normal" Behaviour.

Thank you.

Change History

comment:1 Changed 5 years ago by fredck

  • Keywords Confirmed added
  • Priority changed from High to Normal
  • Type changed from Bug to New Feature
  • Milestone set to CKEditor 3.x

You should use the function option for the replaceAll method:
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.replaceAll

I'm afraid this has been made in this way so the config object is not shared among all editor instances, but we could reconsider this.

comment:2 Changed 4 years ago by fredck

  • Milestone CKEditor 3.x deleted

Milestone CKEditor 3.x deleted

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy