RichText WYSIWYG editor without interface (JavaScript API only)

I am looking for a very clean project to add a cross-browser JavaScript API to the content div.

If it has a user interface, then you can not download it (as opposed to disabling it) or completely remove it from sources.

I am looking for the main functions without really paying much attention to backward compatibility, but rather to cleaner codes.

Some of the functions that I would expect from this API would be as follows:

  • Insert HTML snippet at cursor position
  • Clear content after pasting (e.g. font sizes and sizes)
  • Returns the node where the cursor is currently located
  • Add a new item to the product list

I suppose I could encode them using jQuery, but if anyone has this, why not reuse it.

+6
source share
6 answers

You can use one use of Google -

http://closure-library.googlecode.com/svn/docs/namespace_goog_editor.html

http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/editor/field_basic.html

If your concern for cleaner code is maintainability / extensibility, then all the code in the Closure library is well documented, and all variables / methods are detailed in their name (this is because the Closure compiler will take care of minimizing it for the client).

+4
source

In CKEditor, the user interface and themes are defined as plugins, not part of the kernel, so if you have enough patience, you can override them any way you want.

+1
source

Quill seems to be gaining good traction - https://github.com/quilljs/quill

+1
source

Look at this, it seems appropriate: http://www.artlebedev.ru/tools/reformator/

Source code: http://web.artlebedev.ru/tools/reformator/reformator.zip

PS. It is available for non-commercial use only.

0
source

TinyMice is also a good choice. It has jQuery API

0
source

Source: https://habr.com/ru/post/888871/


All Articles