我正在使用textarea编辑一个简单的富文本编辑器,我只需将粘贴为粗体,斜体和&在textarea下划线一切正常,问题是我无法理解如何插入有序列表&使用此脚本的无序列表。
以下是我的代码。
Untitled Document#my_textarea{
width:300px;
height:150px;
border:thin solid #000;
color:#000;
padding:10px;
min-height:150px;
min-width:300px;
max-height:150px;
max-width:300px;
}
#preview{
width:300px;
height:150px;
border:thin solid #000;
color:#000;
padding:10px;
min-height:150px;
min-width:300px;
max-height:150px;
max-width:300px;
}
function formatText(tag) {
var myTextArea = document.getElementById('my_textarea');
var myTextAreaValue = myTextArea.value;
var selected_txt = myTextAreaValue.substring(myTextArea.selectionStart, myTe
最后
以上就是阳光宝贝最近收集整理的关于基于textarea的最简单的html在线编辑器,使用Textarea的简单富文本编辑器的全部内容,更多相关基于textarea内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复