Home > CMS Tutorial > DEDECMS > How to change the default carriage return key of Dedecms v5.7 editor to paragraph break

How to change the default carriage return key of Dedecms v5.7 editor to paragraph break

藏色散人
Release: 2019-12-17 10:10:25
Original
2538 people have browsed it

How to change the default carriage return key of Dedecms v5.7 editor to paragraph break

Dedecms v5.7 How to change the default carriage return key of the editor to a paragraph break?

The Ckeditor editor of Dedecms v5.7 SP1 has some changes. The default is Enter key to change lines and Shift Enter to change paragraphs. However, all webmaster friends are accustomed to directly hitting Enter key to change paragraphs. After checking I found that its configuration file can be modified and solved.

Recommended study: 梦Weavercms

In fact, you can comment out the following code and use another one. Mode (enter to change paragraphs):

Find: Installation directory\include\ckeditor\config.js:

The code is as follows:

config.autoParagraph = false; 
config.enterMode = CKEDITOR.ENTER_BR; 
config.shiftEnterMode = CKEDITOR.ENTER_P; 
Copy after login

Replace the following 2 lines of code For the following code:

The code is as follows:

config.enterMode = CKEDITOR.ENTER_P; 
config.shiftEnterMode = CKEDITOR.ENTER_BP;
Copy after login

How to change the default carriage return key of Dedecms v5.7 editor to paragraph break

Or you can change it to some of your commonly used HTML tags, such as:

The code is as follows:

config.enterMode = 'p' ; // p | div | br 
config.shiftEnterMode = 'br' ; // p | div | br
Copy after login

The above is the detailed content of How to change the default carriage return key of Dedecms v5.7 editor to paragraph break. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template