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

沒有留言:

張貼留言

pdf.js 無法顯示部份字

有個檔案在pdf viewer套件中無法顯示內容,但下載檔案後使用工具又可以正常顯示。 本來以為是套件版本太舊的原因,於是去下載pdf viewer套件 https://github.com/mozilla/pdf.js 更新後還是一樣。 覺得應是字型缺漏的問題,於是用PDF-X...