What's a good WYSIWYG editor to use with ContentEditable? [closed]

落爺英雄遲暮 提交于 2019-12-05 06:20:14

Version 2.0 of WYMeditor (currently under heavy development by me and others) also uses contentEditable, but relies mostly on selection/ranges/the dom for manipulation as the behavior of the designMode and contenteEditable API:s differ greatly between browser vendors.

Some of the features/design goals are:

  • WYSIWYM editing – Separating content and presentation we enable rich text formatting, but leave the presentation to the designer.

  • A modular architecture – Use only the components you want (and hook them up against your own ui) or drop in a "full stack" editor with toolbars, dialogs and everything.

  • Strict xHTML(5) – The editor outputs strict XHTML by default (making it easy to transform the content as needed). If thats not what you want you can write your own parser and serializer to support any format you want.

  • Placeholders/custom elements – Placeholders and even custom elements enable you to manage almost any kind of content inside the editor. Together with the StructureValidator you can enforce rules for nesting, formatting, valid attributes, etc.

Source is available on GitHub and a first beta version is to be expected within a month or two.

Take a look at HTML5 editor, it take a textarea element and transform it into a div with contentEditable. It have a pretty customizable toolbar to easily format content.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!