CKEditor , how to disable HTML indented format

帅比萌擦擦* 提交于 2020-01-15 11:58:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!