New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[html] 第120天 你知道富文本编辑器的实现原理吗? #1061
Labels
html
html
Comments
按自己想法来大概推理的话 应该是通过设置iframe或者frame,然后每个按钮上绑定不同的点击事件,通过点击按钮可以对容器中的部分文本修改其样式。 |
总结一下技术难点:
|
大概想到的就是这些; 参考文档: |
富文本编辑器基本上都是调用这个指令,完全不需要手动判断选中区域
比如 document.execCommand('bold',false');
//切换选中区域的粗体样式 详情可参考 execCommand |
用iframe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第120天 你知道富文本编辑器的实现原理吗?
趁热打铁,昨天也出了一道类似的题 #1057
The text was updated successfully, but these errors were encountered: