Modify the Add one-key typesetting function for the CKEditor editor

Source: Internet
Author: User

Using Phpcms V9 friends know that V9 built-in use of the CKEditor editor, but the default editor is not very powerful typesetting function, the following green Tea small edit the editor, change a few places, so that the CKEditor editor more practical.

1, bulk removal of hyperlinks:

Open Statics/js/ckeditor/ckeditor.js

Found it:

$.execcommand (' unlink ', false,null);

Modified to:

$.execcommand (' unlink ', false,true);

2, upload pictures automatically add alt parameter

Modify Statics/js/ckeditor/plugins/image/dialogs/image.js

Found it:

AccessKey: ' T ', ' Default ': '

Replace with:

AccessKey: ' T ', ' Default ': $ (' #title '). Val ()

3, modify the editor carriage return line


Open the file staticsjsckeditorconfig.js the inside:

Config.entermode = CKEditor. ENTER_BR;

Config.shiftentermode = CKEditor. enter_p;

Modified to:

Config.entermode = CKEditor. enter_p;

Config.shiftentermode = CKEditor. ENTER_BR;

4. Add one key typesetting function to editor

Modify the form.class.php in the phpcmslibsclasses column to find [' maximize '], add [' AutoFormat '] underneath it, and save it.

Locate the Config.js file under the Staticsjsckeditor folder and find:

Config.extraplugins = ' capture ';

Modified to:

Config.extraplugins = ' Capture,autoformat ';

Save, modify and remember to update the cache, remove cookies.

In fact, the above content is mainly to the CKEditor editor to add a key layout function method. Friends who need to try Oh ~ very practical ha!

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.