Added a custom toolbar (toolbarset) and FCKeditor object for FCKeditor on the page.

Source: Internet
Author: User

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 ());

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.