0
<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 

并在数据库中:

&amp;lt;p&amp;gt;Hi i am &amp;lt;strong&amp;gt;Shawn&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;

从数据库中检索时,它显示

 <p>Hi i am <strong>Shawn</strong></p> at text editor 

我只想得到它在编辑时显示的精确 html 格式:

嗨,我是肖恩

4

0 回答 0