Add one-click typographical function for ckeditor editor Modification

Source: Internet
Author: User

Add one-click typographical function for ckeditor editor Modification

All the friends who use PHPCMS V9 know that V9 has built-in ckeditor, but the default editor's typographical function is not very powerful. The following green tea editor will teach you how to modify the editor and how to change it, make Ckeditor editing more practical.

1. Remove hyperlinks in batches:

Open statics/js/ckeditor. js

Find:

Cmd.exe cCommand ('unlink', false, null );

To:

Cmd.exe cCommand ('unlink', false, true );

2. The ALT parameter is automatically added to the uploaded image.

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

Find:

AccessKey: 'T', 'default ':''

Replace:

AccessKey: 'T', 'default': $ ('# title'). val ()

3. Modify the editor and press enter to wrap the line.

Or

Open the file \ statics \ js \ ckeditor \ config. js and put the following:

Config. enterMode = CKEDITOR. ENTER_BR;

Config. shiftEnterMode = CKEDITOR. ENTER_P;

To:

Config. enterMode = CKEDITOR. ENTER_P;

Config. shiftEnterMode = CKEDITOR. ENTER_BR;

4. Add a one-click typographical function to the editor.

Modify form. class. php under the phpcms \ libs \ classes column to find ['maxiconmize '], add ['autoformat'] under it, and save it.

Find the config. js file in the statics \ js \ ckeditor folder and find:

Config. extraPlugins = 'capture ';

To:

Config. extraPlugins = 'capture, autoformat ';

Save the modification and remember to update the cache to clear cookies.

In fact, the above content is mainly to add a one-click typographical function to the ckeditor editor. You can try it out if you need it ~ Very practical!

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.