问题
I'd like to ask if there is a way to disable indented format of HTML source code in CKEditor. I don't want the HTML to be formatted because I want to store it in a database and there is no need for extra characters (line breaks and spaces). I just want the raw html without spaces and lines.
for example the HTML output in CKEditor is
<p>
test 1</p>
<p>
test 2</p>
<p>
test 3</p>
but what I need is
<p>test 1</p><p>test 2</p><p>test 3</p>
回答1:
This doc at the CKEditor howto shows how you can modify the formatting of the output, so you just have to specify the rules that you want: http://docs.cksource.com/CKEditor_3.x/Howto/FCKeditor_HTML_Output
来源:https://stackoverflow.com/questions/9737554/ckeditor-how-to-disable-html-indented-format