The kindeditor editor does not contain blockquote tags by itself. If you need to add tags, You need to modify them by yourself, next, I will introduce you to the steps for adding blockquote tags to the kindeditor editor in eblog. For more information, see.
Blockquote labels should be a very common feature for many people, which is also convenient to use. If you don't talk much about it, let's start the transformation journey.
Kindeditor adds custom plug-ins and "blockquote" plug-ins
1. Add the plugins/bockquote. js file.
The Code is as follows: |
Copy code |
KindEditor. plugin ('bockquote ', function (K ){ Var self = this, name = 'bockquote '; Self. clickToolbar (name, function (){ Var lang = self. lang (name + '.'), Html = ['<div style = "padding: 10px 20px;"> ', '<Textarea class = "ke-textarea" style = "width: 408px; height: 260px;"> </textarea> ', '</Div>']. join (''), Dialog = self. createDialog ({ Name: name, Width: 450, Title: self. lang (name ), Body: html, YesBtn :{ Name: self. lang ('yes '), Click: function (e ){ Var type = textarea. val (); Html = '<blockquote>' + K. escape (type) + '</blockquote> '; Self. insertHtml (html). hideDialog (). focus (); } } }), Textarea = K ('textea ', dialog. div ); Textarea [0]. focus (); }); }); |
2. Define the language and modify the lang/zh_CN.js file. Add the following code.
Bockquote: 'insert quot ',
3. Modify themes/default/default.pngimage and the default.css file.
I have modified this image, and the person who will be able to use photoshop to modify it is the last icon of the image.
Add the following code to the default.css file:
The Code is as follows: |
Copy code |
. Ke-icon-bockquote { Background-position: 0px-1248px; Width: 16px; Height: 16px; } |
4. Add the bockquote plug-in to the items array when calling the editor.
The Code is as follows: |
Copy code |
Items: ['bockquote'] |