I have been an online examination system for the past two days, and I have provided very little time. I am working very late every day. But there are also a lot of GAINS, please note!
I. added custom toolbarset in FCKeditor.
In fact, you only need to add some configuration in fckconfig. js. Mine is as follows:
Fckconfig. toolbarsets ["exam_option"] = [<br/> ['bold ', 'italic', 'underline', 'strikethangout', '-', 'orderedlist ', 'unorderedlist', '-', 'textcolor', 'bgcolor', '-', 'fitwindow', '-', 'about'] <br/>];
The rest is to reference this configuration normally. When it is used after configuration, the "toolbar setting XXX does not exist" may be reported, which is actually the reason for browser cache. Just clear the cache.
Ii. Reference FCKeditor on the page
Generally, we use FCKeditor through the fck label, but sometimes we need to dynamically add and delete the FCKeditor on the page. The FCKeditor object is required to be created. The Code is as follows:
VaR fck = new FCKeditor (no_same); <br/> fck. basepath = '$ {CTX}/commons/FCKeditor/'; <br/> fck. toolbarset = "exam_option"; <br/> fck. width = "320px"; <br/> fck. height = "60px"; <br/> fck. value = ""; <br/> // Add the created FCKeditor object to the desired position. <br/> $ fck_container.append (fck. createhtml ());