Prevent CKEditor from formatting code in source mode

前端 未结 5 712
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 07:31

How can you prevent any automatic formatting when in CKEditor when viewing in source mode?

I like to edit HTML source code directly instead of using the WYSIWYG

5条回答
  •  [愿得一人]
    2021-02-05 08:03

    I wanted to preserve newlines in my source, and the protectedSource feature works well for that. I added this to my config.js:

    config.protectedSource = [/\r|\n/g];
    

提交回复
热议问题