gpt4 book ai didi

JavaScript 所见即所得的富文本编辑器

转载 作者:行者123 更新时间:2023-11-29 10:53:50 25 4
gpt4 key购买 nike

在输入框内设置文本样式的基本方法是什么?你能告诉我如何单独更改文本颜色的最简单示例吗?

最佳答案

非常简单:

window.document.designMode = “On”;

document.execCommand(‘ForeColor’, false, ‘red’);

更多详情:

http://shakthydoss.com/javascript/html-rich-text-editor/

然后

http://shakthydoss.com/javascript/stxe-html-rich-text-editor/

关于JavaScript 所见即所得的富文本编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4557729/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com