Home > CMS Tutorial > PHPCMS > body text

Which editor is used for PHPCMS?

Guanhui
Release: 2020-06-19 17:34:02
Original
2659 people have browsed it

Which editor is used for PHPCMS?

# Which editor does PHPCMS use?

PHPCMS uses the CKEditor editor. CKEditor is a new generation of FCKeditor, a re-developed version. This editor is one of the best online web text editors in the world because of its amazing Its performance and scalability make it widely used in major websites.

Integrate CKEditor

There are several ways to integrate CKEditor into your web page. Here we introduce the most commonly used implementations method.

Step One: Load CKEditor

CKEditor is a JavaScript application, you only need to include a file reference in your web page to load it.

If you have installed CKEditor in the "ckeditor" directory of your website, you can refer to the following example:


...


Copy after login

Load in the above way, the CKEditor JavaScript API is ready and can be used. .

Step 2: Create an editor instance

CKEditor works like a text area (textarea) in your web page. It provides a simple and easy-to-write user interface and layout. and rich text input areas. But it is not easy to achieve the same effect with a text area. It requires the user to enter html code.

However, in fact, CKEditor still uses a text area to transfer its data to the server. This text area is invisible to the user. Therefore, you must create and edit an instance. First create an instance:

Copy after login

Note that if you want to load some data into the editor, such as reading data from a database, you only need to put the data in Just inside a textarea, like in the example above. In this example, we have named the textarea "editor1". This name will be used in server operations when receiving POST submitted data. To start using the CKEditor Javascript API, we use an editor instance to "replace" this ordinary text area (textarea). To do this, we must add the following JavaScript code:

Copy after login

The above script block only Can be included after the