I am trying to specify a custom config file and change the way the editor indents and line breaks tags. I tried to piece together code I found from the forum but I can't get the two snippets to work together.
The editor seems to work fine and it uses the custom config file but the rest of the code does nothing.
If I remove the custom config file (as below), the rest of the code works.
How should I change my code so the editor uses the custom config file and the code after it?
The editor seems to work fine and it uses the custom config file but the rest of the code does nothing.
CKEDITOR.replace('post_body',{ customConfig : 'forum_new_config.js' }, { on : { instanceReady : function( ev ) { var tags = ['p', 'ol', 'ul', 'li', 'h1', 'h2', 'h3']; // etc. for (var key in tags) { ev.editor.dataProcessor.writer.setRules(tags[key], { indent : false, breakBeforeOpen : true, breakAfterOpen : false, breakBeforeClose : false, breakAfterClose : true }); }}}});
If I remove the custom config file (as below), the rest of the code works.
CKEDITOR.replace('post_body', { on : { instanceReady : function( ev ) { var tags = ['p', 'ol', 'ul', 'li', 'h1', 'h2', 'h3']; // etc. for (var key in tags) { ev.editor.dataProcessor.writer.setRules(tags[key], { indent : false, breakBeforeOpen : true, breakAfterOpen : false, breakBeforeClose : false, breakAfterClose : true }); }}}});
How should I change my code so the editor uses the custom config file and the code after it?
Re: Integrate custom config file and other code
I just added the other code to my custom config file.
So now I have just the following in my page that has the editor:
Then I added the following to the bottom of my custom config page:
Re: Integrate custom config file and other code
You can use this