【问题标题】:Set content with plain text does not work in TinyMCE使用纯文本设置内容在 TinyMCE 中不起作用
【发布时间】:2020-07-24 15:35:24
【问题描述】:

我试过了:

tinymce.activeEditor.setContent("<b>This</b> is <u>my</u> first example.", {format: 'text'});

但是,它仍然是作为 HTML 内容输入的。我没有发现错误。

【问题讨论】:

    标签: tinymce tinymce-5


    【解决方案1】:

    你错过了“.selection”:

    tinymce.activeEditor.selection.setContent("<b>This</b> is <u>my</u> first example.", {format: 'text'});
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-31
      • 1970-01-01
      • 1970-01-01
      • 2019-05-25
      • 1970-01-01
      • 2011-07-30
      • 2011-12-25
      • 1970-01-01
      相关资源
      最近更新 更多