<script type="text/javascript">
tinymce.init({
selector: "textarea",
mode: "exact",
theme: "modern",
editor_selector: "elm1",
encoding: "xml",
menubar: "false",
plugins: ["textcolor "],
toolbar1: " bold italic | print preview media | forecolor backcolor emoticons"
});
</script>
文本框:
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%" runat="server"></textarea>
当我保存它显示的数据时:
<p>Hi i am <strong>Shawn</strong></p> at text editor
并在数据库中:
&lt;p&gt;Hi i am &lt;strong&gt;Shawn&lt;/strong&gt;&lt;/p&gt;
从数据库中检索时,它显示
<p>Hi i am <strong>Shawn</strong></p> at text editor
我只想得到它在编辑时显示的精确 html 格式:
嗨,我是肖恩