javascript - How to format the HTML output of CKEDITOR? -


i want format html output of ckeditor. using code set rules p tags

editor_new = ckeditor.appendto( 'editorspace',{                 on:{                     instanceready: function(ev){                         this.dataprocessor.writer.linebreakchars = '';                         this.dataprocessor.writer.setrules( 'p', {                             indent: false,                             breakbeforeopen: false,                             breakafteropen: false,                             breakbeforeclose: false,                             breakafterclose: false         }); 

it has changed output format

<p>tony</p>  <p>&nbsp;</p>  <p>stark</p> 

to

<p>tony</p> <p>&nbsp;</p>  <p>stark</p> 

but problem when use editor.getdata() on editor, adds 1 \n after every line normal string. want eliminate \n on backend side.

i want configure html of editor this

<p>tony</p><p>&nbsp;</p><p>stark</p> 

without spaces , breaks backend not need care data coming frontend , stores in database as-is. there way can achieve this?

ps: have shown example p tags. want achieve every tag. in short, want generate html in same way minified js file stores javascript content.

just rid of html output writer plugin, i.e. config.removeplugins:

ckeditor.replace( 'editor', {     removeplugins: 'htmlwriter' } ); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -