About the Rich Text Editor

After using many rich text editors, I finally have some summary experience.

I have changed no less than 5 rich text editors in the past two days, and finally I chose the first one I used. The latter ones have been tried in vain.

Let's talk about the needs of this project first, 1. Basic font and style modification is required, and if you want the image upload function, you need to upload it to your company's server, and add the editing after obtaining the address. 2. The placeholder attribute is required.

Maybe many people think that there are many rich text editors for these two properties, but after I spent about a day looking for it, only one can barely meet my needs, and the placeholder attribute can only be achieved by modifying the original plug-in. .

Here are the rich text editors I've used:

1.react-mde https://github.com/andrerpena/react-mde.

This is a very simple editor, but it can't upload pictures. To upload pictures, you need to add your own URL. There is a placeholder attribute.

2.wangEditor https://github.com/wangfupeng1988/wangEditor.

In the end, I chose this rich text editor. In addition to the placeholder, this editor fully meets the needs of the image upload function. The placeholder can only be satisfied by its own js capabilities, and there may be some shortcomings, but the basic There is no difference between the native placeholder on the .

3.react-quill  https://github.com/zenoamaro/react-quill

This is an editor written by a foreign brother. After reading the things of a foreign brother, I really admire it. Foreign coders will help each other. This is rarely done in China. This editor cannot satisfy me because , the editor has converted the picture to base64, although the picture can be displayed normally, but the backend needs to receive more parameters, which is a bit embarrassing and can only be given up.

4.braft-editor https://github.com/margox/braft-editor 

This is packaged based on draftjs. It is a very good rich text editor. With placeholder, the picture can be uploaded to its own server normally, but the uploaded picture does not support bmp. Its compatibility, requires ie11+

Attach draftjs: https://github.com/facebook/draft-js, this one has more than 1w stars, developed by foreign friends.

5.react-draft-wysiwyg :https://github.com/jpuri/react-draft-wysiwyg

This document says that I can't understand it, although the reference is successful, but I don't know how to set the api, and I don't know how to set the upload and so on.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324931661&siteId=291194637