Table of Contents
为ckeditor编辑器修改添加一键排版功能
  1、批量去除超链接:
  2、上传图片自动添加ALT参数
  3、修改编辑器回车换行
  4、给编辑器添加一键排版功能
Home php教程 php手册 为ckeditor编辑器修改添加一键排版功能

为ckeditor编辑器修改添加一键排版功能

Jun 13, 2016 am 09:19 AM
ckeditor One Key for Revise Function typesetting Add to editor

为ckeditor编辑器修改添加一键排版功能

   使用PHPCMS V9的朋友都知道,V9内置使用ckeditor编辑器,但是默认编辑器的排版功能不是很强大,下面绿茶小编教大家修改一下编辑器,改动几个地方,让Ckeditor编辑更加实用一些。

  1、批量去除超链接:

  打开 statics/js/ckeditor/ckeditor.js

  找到:

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

  修改为:

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

  2、上传图片自动添加ALT参数

  修改 statics/js/ckeditor/plugins/image/dialogs/image.js

  找到:

  accessKey:'T','default':''

  替换成:

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

  3、修改编辑器回车换行

or

  打开文件 \statics\js\ckeditor\config.js 把里面的:

  config.enterMode = CKEDITOR.ENTER_BR;

  config.shiftEnterMode = CKEDITOR.ENTER_P;

  修改为:

  config.enterMode = CKEDITOR.ENTER_P;

  config.shiftEnterMode = CKEDITOR.ENTER_BR;

  4、给编辑器添加一键排版功能

  修改phpcms\libs\classes栏目下的 form.class.php 找到['Maximize'],在它下面添加['autoformat'],保存即可。

  找到statics\js\ckeditor文件夹下的 config.js 文件,找到:

  config.extraPlugins = 'capture';

  修改为:

  config.extraPlugins = 'capture,autoformat';

  保存即可,修改后记得更新缓存,清除cookies。

  其实上面的内容主要就是给ckeditor编辑器添加一键排版功能的方法。有需要的朋友可以试下哦~非常实用的哈!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to change the personal name in the group on DingTalk_How to modify the personal name in the group on DingTalk How to change the personal name in the group on DingTalk_How to modify the personal name in the group on DingTalk Mar 29, 2024 pm 08:41 PM

1. First open DingTalk. 2. Open the group chat and click the three dots in the upper right corner. 3. Find my nickname in this group. 4. Click to enter to modify and save.

The difference between vivox100s and x100: performance comparison and function analysis The difference between vivox100s and x100: performance comparison and function analysis Mar 23, 2024 pm 10:27 PM

Both vivox100s and x100 mobile phones are representative models in vivo's mobile phone product line. They respectively represent vivo's high-end technology level in different time periods. Therefore, the two mobile phones have certain differences in design, performance and functions. This article will conduct a detailed comparison between these two mobile phones in terms of performance comparison and function analysis to help consumers better choose the mobile phone that suits them. First, let’s look at the performance comparison between vivox100s and x100. vivox100s is equipped with the latest

How to add a TV to Mijia How to add a TV to Mijia Mar 25, 2024 pm 05:00 PM

Many users are increasingly favoring the electronic ecosystem of Xiaomi smart home interconnection in modern life. After connecting to the Mijia APP, you can easily control the connected devices with your mobile phone. However, many users still don’t know how to add Mijia to their homes. app, then this tutorial guide will bring you the specific connection methods and steps, hoping to help everyone in need. 1. After downloading Mijia APP, create or log in to Xiaomi account. 2. Adding method: After the new device is powered on, bring the phone close to the device and turn on the Xiaomi TV. Under normal circumstances, a connection prompt will pop up. Select "OK" to enter the device connection process. If no prompt pops up, you can also add the device manually. The method is: after entering the smart home APP, click the 1st button on the lower left

What are the operating skills for excel typesetting? What are the operating skills for excel typesetting? Mar 20, 2024 pm 05:01 PM

In order to achieve the visual effect of the entire document, both word and excel files need to be typed. However, many novice friends do not know how to perform excel typesetting. Below, we will share some typesetting operation skills, hoping to give you some Inspiration on operational skills! 1. First, we create and open an excel form and enter some simple content to facilitate demonstration operations. 2. We find the print preview function menu in the menu bar above the file. 3. Click the print preview function, and we find that the table is asymmetrical when it is not typeset. We need to find the page setup function in the menu bar above the document. 4. Click Page Settings and find the margin function in the function menu that opens. 5. Click

What exactly is self-media? What are its main features and functions? What exactly is self-media? What are its main features and functions? Mar 21, 2024 pm 08:21 PM

With the rapid development of the Internet, the concept of self-media has become deeply rooted in people's hearts. So, what exactly is self-media? What are its main features and functions? Next, we will explore these issues one by one. 1. What exactly is self-media? We-media, as the name suggests, means you are the media. It refers to an information carrier through which individuals or teams can independently create, edit, publish and disseminate content through the Internet platform. Different from traditional media, such as newspapers, television, radio, etc., self-media is more interactive and personalized, allowing everyone to become a producer and disseminator of information. 2. What are the main features and functions of self-media? 1. Low threshold: The rise of self-media has lowered the threshold for entering the media industry. Cumbersome equipment and professional teams are no longer needed.

Can Douyin Blue V change its name? What are the steps to change the name of corporate Douyin Blue V account? Can Douyin Blue V change its name? What are the steps to change the name of corporate Douyin Blue V account? Mar 22, 2024 pm 12:51 PM

Douyin Blue V certification is the official certification of a company or brand on the Douyin platform, which helps enhance brand image and credibility. With the adjustment of corporate development strategy or the update of brand image, the company may want to change the name of Douyin Blue V certification. So, can Douyin Blue V change its name? The answer is yes. This article will introduce in detail the steps to modify the name of the enterprise Douyin Blue V account. 1. Can Douyin Blue V change its name? You can change the name of Douyin Blue V account. According to Douyin’s official regulations, corporate Blue V certified accounts can apply to change their account names after meeting certain conditions. Generally speaking, enterprises need to provide relevant supporting materials, such as business licenses, organization code certificates, etc., to prove the legality and necessity of changing the name. 2. What are the steps to modify the name of corporate Douyin Blue V account?

What are the functions of Xiaohongshu account management software? How to operate a Xiaohongshu account? What are the functions of Xiaohongshu account management software? How to operate a Xiaohongshu account? Mar 21, 2024 pm 04:16 PM

As Xiaohongshu becomes popular among young people, more and more people are beginning to use this platform to share various aspects of their experiences and life insights. How to effectively manage multiple Xiaohongshu accounts has become a key issue. In this article, we will discuss some of the features of Xiaohongshu account management software and explore how to better manage your Xiaohongshu account. As social media grows, many people find themselves needing to manage multiple social accounts. This is also a challenge for Xiaohongshu users. Some Xiaohongshu account management software can help users manage multiple accounts more easily, including automatic content publishing, scheduled publishing, data analysis and other functions. Through these tools, users can manage their accounts more efficiently and increase their account exposure and attention. In addition, Xiaohongshu account management software has

Introduction to Go language development tools: a list of essential tools Introduction to Go language development tools: a list of essential tools Mar 29, 2024 pm 01:06 PM

Title: Introduction to Go language development tools: List of essential tools In the development process of Go language, using appropriate development tools can improve development efficiency and code quality. This article will introduce several essential tools commonly used in Go language development, and attach specific code examples to allow readers to understand their usage and functions more intuitively. 1.VisualStudioCodeVisualStudioCode is a lightweight and powerful cross-platform development tool with rich plug-ins and functions.

See all articles