如何在bootstrap-wysiwyg中使用insertHTML或插入html?

问题描述 投票:0回答:1

此问题可能类似于this one

我正在使用bootstrap-wysiwyg,我想在#editor div中插入一些html。插入要格式化的HTML后,浏览器应该会解释我要插入的HTML。例如,当我插入:

<b>some</b> text

我希望看到一些粗体的单词,并且不要用“ b”标签包围。我想我应该使用在网站Rich-Text_Editing_in_Mozilla上找到的insertHTML。不幸的是,我没有找到任何简单的示例来使用它。

我在jquery中要求简单的示例,例如$(“#editor”)。html(“ 文本”)。

twitter-bootstrap wysiwyg inserthtml
1个回答
0
投票

<a class="btn" data-edit="insertHTML <table border='1|0'><tr><td>Val1</td><td>Val2</td></tr></table>" title="Table"><i class="fa fa-table"></i></a>

© www.soinside.com 2019 - 2024. All rights reserved.