所见即所得的 Google Wave
我正在寻找类似谷歌波浪的所见即所得编辑器,但没有成功。我尝试过 jWYSIWYG、clEditor 和其他几个编辑器。
现在我想自己实现它。您对它的工作原理有什么想法吗?特别是他们如何绘制插入符号并处理鼠标/键盘事件和文本选择。
我不想使用任何现有的所见即所得编辑器,因为它们没有给我我想要的东西。
先感谢您。
I was searching for the google wave-like wysiwyg editor but did not succeed on it. I've tried jWYSIWYG, clEditor and couple of other editors.
Now i want to implement it by myself. Do you have any ideas about how it working? Especially how do they draw a caret and handle mouse/keyboard events and text selection.
I don't want to use any existing WYSIWYG editors because they dont give me what i want.
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以查看一些流行的开源编辑器的源代码,以了解他们的方法,这可能会让您深入了解如何解决您的解决方案。
TinyMCE 在 GitHub 上:
https://github.com/tinymce/tinymce
CKEditor 有一个 SVN 存储库:
< a href="http://dev.ckeditor.com/browser" rel="nofollow">http://dev.ckeditor.com/browser
当然,它们是Javascript,所以你真的可以看看你想看的任何一个。
You could peek at the source code of some of the popular open source editors to get an idea of their approach, might give you some insight into how you want to tackle your solution.
TinyMCE is on GitHub:
https://github.com/tinymce/tinymce
CKEditor has a SVN repo:
http://dev.ckeditor.com/browser
And of course, they are Javascript, so you really look at any of them you want to.
我将回答我的问题——使用 contentEditable 属性。
I will answer my question -- use contentEditable property.