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>
有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top