Kindeditor toolbar Configuration

Source: Internet
Author: User

Compared with fck, kindeditor editing is easier to use. Kindeditor can also be used to increase or decrease functions in the toolbar.

Sometimes, you only need to paste the font effect of the editor and the image address in the front-end of a Member or website. The default kindeditor is used to list all functions, so you need to configure it.

Open the kindeditor. js file under the kindeditor directory and search for items: About 60 lines. You can see that all the toolbar buttons are defined as an array here. Delete a button that you don't need. However, this operation will affect all pages that call the editor. Therefore, we can define an array on the ASPX page of the reduce button before referencing the kindeditor. js file, for example:

VaR itemshow = ['title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold ', 'italic', 'underline ', 'strikethangout', 'removeformat', '|', 'image', 'hr ', 'emoticons', 'link', 'unlink'];
<SCRIPT type = "text/JavaScript" src = "../kindeditor. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
Ke. Show ({
ID: '<% = txtcontent. clientid %> ',
Allowfilemanager: false,
Allowupload: false
});
</SCRIPT>

Then add a judgment in front of KE. Setting = {In kindeditor. js.

If (typeof (itemshow) = 'undefined '){
Itemshow = ['source', '|', 'fullscreen ', 'undo', 'redo ', 'print', 'Cut ', 'copy', 'paste ', 'plainpaste ', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent ', 'outdent ', 'subscript', 'superscript',' | ', 'selectall','-', 'title', 'fontname', 'fontsize',' | ', 'textcolor', 'bgcolor', 'bold ', 'italic', 'underline', 'strikethangout', 'removeformat', '|', 'image', 'flash ', 'Media ', 'advtable', 'hr', 'emoticons', 'link', 'unlink',' | ', 'about'];
}

Here, itemshow is defined to display all buttons by default.

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.