开发者

RichText WYSIWYG editor without UI (JavaScript API only) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question

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

If it has UI, then it should be possible not to load it (as opposed to disabling it) or completely rem开发者_运维问答ove from sources.

I am looking for basic features really without huge focus on backward-compatibility but rather a cleaner code.

Some of the features, I would expect from this API would be:

  • Insert HTML snippet at the position of the cursor
  • Clean up contents after paste (such as spans and font sizes)
  • Return node, where cursor currently is positioned
  • Add new item to item list

I suppose I could code them with some jQuery, but if someone have it, why not re-use it.


You could use the one Google use -

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 about cleaner code relates to maintainability/extensibility then all the code in the Closure library is well documented and all variables/methods are verbose in their naming (this is because the Closure Compiler will take care of minifying them for the client).


In CKEditor the UI and themes are defined as plugins and not part of the core, so if you have enough patience you could redefine them in any way that you want.


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


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

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

PS. It's free for non-commercial use only.


TinyMice is also good choice. It has jQuery API


What about WYMEditor?

  • http://www.wymeditor.org/
  • https://github.com/wymeditor/wymeditor
  • http://files.wymeditor.org/wymeditor/trunk/src/examples/12-custom-layout.html
  • http://files.wymeditor.org/wymeditor/trunk/src/examples/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜