如何在dijit.Editor中将HTML标记解析为文本功能?

如何在dijit.Editor中将HTML标记解析为文本功能?,html,dojo,formatting,editor,Html,Dojo,Formatting,Editor,我在页面上有一个dijit.Editor。 如果我键入“example”并应用粗体功能,它将看起来像“example”。我从编辑器中得到的文本是example 但是,如果我想将粗体文本放入编辑器,并将内容设置为example,我可以在编辑器字段中看到“example”,而不是example 我试图通过设置文本 new dijit.Editor({ content: this.text }); 及 有没有办法让dijit.Editor将所有这些标记解析为文本功能?问题与 谢谢大家的帮助

我在页面上有一个dijit.Editor。
如果我键入“example”并应用
粗体
功能,它将看起来像“example”。我从编辑器中得到的文本是
example

但是,如果我想将粗体文本放入编辑器,并将内容设置为
example
,我可以在编辑器字段中看到“example”,而不是example
我试图通过设置文本

new dijit.Editor({
    content: this.text
});


有没有办法让dijit.Editor将所有这些标记解析为文本功能?

问题与


谢谢大家的帮助

如何设置内容?对不起,忘记放代码了。检查问题。据我所知,有editor.set(“值”、“示例”);,您正在使用哪个dojo版本?好的,您也可以尝试:var editor=new dijit.editor({content:this.text});editor.setValue(“示例”);或editor.replaceValue(“示例”);例如,这不是必要的,
editor.execCommand("inserthtml", this.text);