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了.

沒有留言:

張貼留言

publish error allowDefinition='MachineToApplication'

一個老舊的aspx web form專案,調了一些功能建置成功,但進行部署時顯示以下錯誤。 在應用程式層級之外使用註冊為 allowDefinition='MachineToApplication' 的區段發生錯誤。錯誤的原因可能是虛擬目錄尚未在 IIS 中設定為...