For the Web page Editor to do the project is a very useful editor, greatly reduce the burden on developers, feel Kindsoft is a good choice, so also in constant use.
under the face of some simple configuration to sum up:
The first is to import the downloaded Kindsoft file into the project directory;
Copy Code code 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>
These two references are in the head section of the xx.aspx file
then insert the following section of code:
Copy Code code as follows:
<script>
var editor;
Kindeditor.ready (function (K) {
Editor = k.create (' #tbContent ');
});
</script>
Tbcontent is to embed the input tag ID value, hehe, Ha Hei, and surprise appeared; The following figure shows:
But if you want to do a picture, flash or video upload, you will be very depressed, many times because the upload path is wrong, so you need to set your picture, flash or video file path; Just change the previous paragraph of code to the following section to meet the basic requirements:
Copy Code code 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
});
});
The color section above should choose the appropriate path according to the path of the file;
The final thing is that the controls in the editor are not what you need, so you need to configure them in the following path:
Expand kindeditor-4.1.4, find the Kindeditor.js file, double-click on it, and then find a 246 page or so, there is a items, in the following configuration parameters:
Copy Code code 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 ', ' hilitecolor ', ' bold ',
' Italic ', ' underline ', ' strikethrough ', ' lineheight ', ' removeformat ', ' | ', ' image ', ' multiimage ',
' Flash ', ' media ', ' insertfile ', ' table ', ' hr ', ' emoticons ', ' baidumap ', ' pagebreak ',
' Anchor ', ' link ', ' unlink ', ' | ', ' about '
]
the parameters are explained as follows:
Source |
HTML code |
Preview |
Preview |
Undo |
Back off |
Redo |
Forward |
Cut-and |
Shear |
Copy |
Copy |
Paste |
Paste |
Plainpaste |
Paste as unformatted text |
Wordpaste |
Paste from Word |
SelectAll |
Select All |
Justifyleft |
Left-aligned |
Justifycenter |
Center |
Justifyright |
Align Right |
Justifyfull |
Justify justification |
Insertorderedlist |
Number |
Insertunorderedlist |
Project symbol |
Indent |
Increase Indent |
Outdent |
Reduce indentation |
Subscript |
Subscript |
Superscript |
Superscript |
Formatblock |
Paragraph |
FontName |
Font |
FontSize |
Text Size |
ForeColor |
Text color |
Hilitecolor |
Text background |
Bold |
Bold body |
Italic |
Italic body |
Underline |
Underline |
Strikethrough |
Delete Line |
Removeformat |
Delete format |
Image |
Image |
Flash |
Flash |
Media |
Video and Audio |
Table |
Form |
hr |
Insert horizontal Line |
Emoticons |
Insert Expression |
Link |
Super link |
Unlink |
Unlink Hyperlinks |
Fullscreen |
Full Screen display |
About |
About |
Print |
Print |
Code |
Inserting program code |
Map |
Google Maps |
Baidumap |
Baidu Map |
Lineheight |
Spaced |
Clearhtml |
Clean up HTML code |
PageBreak |
Insert Page Break |
Quickformat |
One-click Layout |
InsertFile |
Insert File |
Template |
Insert Template |
Anchor |
Inserting anchor points |