2011年3月23日 星期三

CKEditor p tag

繼上次借用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了.

沒有留言:

張貼留言

VS CODE離線安裝套件方式-續

去年 vscode離線安裝 powershell nupkg 今年在一台無外網的 windwos 2025上安裝時遇到了powershell版本一直讀取到了5.1的版本,鬼打牆了一下午,在VM還原重測測了好幾回,應該是可行了。 將下載到的免安裝powershell 解壓縮到...