开发者

JavaScript Layout Engine like Google Docs?

Does a JavaScript layout engine for laying out text like that in Google Docs exist? I know Google Doc开发者_Python百科s does some crazy things to get stuff to work (eschewing things like designMode and contentEditable completely, with Microsoft Office Online doing quite a similar thing).


Neither of these are quite what you're looking for, though they might be good for specific purposes:

  • Surface is "A building block for web-based text editors ... intended to be an extensible low-level interface for semantic rich text editing" from the folks at Surface.io

  • The current state of the art for source-code editors is ACE


Ritzy is a new open source rich text editor that contains a custom javascript surface and layout engine just like Google Docs.

It is based on Facebook React and SwarmJS and is primarily intended for embedding into applications to support rich text entry with real-time collaboration.

As far as I know, this is the first open source implementation of this technique. Note that this is pretty new and hasn't seen any real-world testing/usage, so there are some known bugs and likely lots of unknown ones as well.

Disclaimer: I am the author of the above-mentioned project.


When it comes to editing, the following might help. For the "javascript layout engine", I'm still looking...

  • rangyinputs:A small cross-browser JavaScript library for obtaining and manipulating selections within and HTML elements. Rangyinputs is currently available as a jQuery plugin.

  • rangy: A cross-browser JavaScript range and selection library. It provides a simple standards-based API for performing common DOM Range and Selection tasks in all major browsers, abstracting away the wildly different implementations of this functionality between Internet Explorer up to and including version 8 and DOM-compliant browsers. For manipulating selections in and elements, see Rangy's poorly-named and svelter twin project, Rangyinputs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜