繼上次借用Bugnet的htmleditor provider放在內部QA專案後,同事反應,為什麼RDLC報表跑出來這個問題說明內的說明文字每一行都空那麼大啊....很醜耶...
想想也是,挺佔空間的. 於是查了一下CKEditor的API線上文件說明
CKEDITOR.config.enterMode
Sets the behavior for the ENTER key. It also dictates other behaviour rules in the editor, like whether the <br> element is to be used as a paragraph separator when indenting text. The allowed values are the following constants, and their relative behavior:
使用方法如下:
找到Provider\HtmlEditorProviders\CKEditor\config.js檔
加入這段設定即可
config.enterMode = CKEDITOR.ENTER_BR;
這樣按下Enter鍵後, 原本的p tag就變成br tag了.
沒有留言:
張貼留言