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> </p> <p>stark</p>
to
<p>tony</p> <p> </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> </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
Post a Comment