Introduction to simple configuration parameters of kindSoft Online Web Editor

Source: Internet
Author: User

The Web editor is a very useful editor for projects, which greatly reduces the burden on developers. KindSoft is a good choice, so it is constantly used.

The following is a summary of some simple configurations.:
First, import the downloaded KindSoft file to the project directory;Copy codeThe Code is as follows: <script src = "../Content/kindeditor-4.1.4/kindeditor-all.js" type = "text/javascript"> </script>
<Script src = "../Content/kindeditor-4.1.4/lang/zh_CN.js" type = "text/javascript"> </script>

The two references are in the Head part of the xx. aspx file.
Insert the following code:Copy codeThe Code is as follows: <script>
Var editor;
KindEditor. ready (function (K ){
Editor = K. create ('# tbcontent ');
});
</Script>

TbContent is the id value of the Input tag to be embedded. It appears in the pop-up, as shown in:

However, if you want to upload images, flash files, or videos, you will be very depressed. In many cases, errors may occur due to incorrect upload paths, therefore, you need to set the path of your image, flash, or video file. You only need to change the above Code to the following part to meet the basic requirements:Copy codeThe Code is as follows: <script language = "javascript" type = "text/javascript">
KindEditor. ready (function (K ){
K. create ('# tbcontent ',{
UploadJson: '../Content/kindeditor-4.1.4/asp.net/upload_json.ashx ',
FileManagerJson: '../Content/kindeditor-4.1.4/asp.net/file_manager_json.ashx ',
AllowFileManager: true
});
});

Select a proper path based on your file path;
Finally, the controls in the editor are not what you need, so you need to configure them in the following path:
Expand the kindeditor-4.1.4, find the kindeditor. js file, double-click to go, and then find around 246 page, there is an Items, and then the following configuration parameters:Copy codeThe Code is as follows :[
'Source', '|', 'undo ', 'redo', '|', 'preview', 'print ', 'template', 'code', 'Cut ', 'copy', 'paste ',
'Plainpaste ', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright ',
'Justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent ', 'outdent', 'subscript ',
'Superscript', 'clearhtml ', 'quickformat', 'selectall',' | ', 'fullscreen ','/',
'Formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitcolor', 'bold ',
'Italic ', 'underline', 'strikethangout', 'lineheight', 'removeformat',' | ', 'image', 'multiimage ',
'Flash', 'Media ', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak ',
'Anchor', 'link', 'unlink', '|', 'about'
]

The parameters are described as follows::

Source HTML code
Preview Preview
Undo Back
Redo Forward
Cut Cut
Copy Copy
Paste Paste
Plainpaste Paste as unformatted text
Wordpaste Paste from Word
Selectall Select All
Justifyleft Left aligned
Justifycenter Center
Justifyright Right alignment
Justifyfull Alignment at both ends
Insertorderedlist No.
Insertunorderedlist Project symbol
Indent Increase indentation
Outdent Reduce indentation
Subscript Subscript
Superscript Superscript
Formatblock Section
Fontname Font
Fontsize Text Size
Forecolor Text color
Hilitecolor Text background
Bold Bold
Italic Italics
Underline Underline
Strikethrough Strikethrough
Removeformat Delete format
Image Image
Flash Flash
Media Video/audio
Table Table
Hr Insert a horizontal line
Emoticons Insert emoticon
Link Hyperlink
Unlink Cancel hyperlink
Fullscreen Full Screen Display
About About
Print Print
Code Insert program code
Map Google Maps
Baidumap Baidu Map
Lineheight Line spacing
Clearhtml Clear HTML code
Pagebreak Insert a paging character
Quickformat One-click Layout
Insertfile Insert File
Template Insert Template
Anchor Insert anchor

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.