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!