TinyMCE not grabbing content from textarea before hiding that textarea

前端 未结 1 1522
盖世英雄少女心
盖世英雄少女心 2021-01-21 20:09

I have an instance of TinyMCE running on a page that enables me to edit existing posts. I query the db, and populate the variable $content with the stored text. I t

相关标签:
1条回答
  • 2021-01-21 21:01

    Try the following. Give your textarea the id "editor1", use mode: "exact", instead of mode: "textareas", and initialize your editor the following way (keep the tinymce init where it is for now, but before the following lines)

    $(document).ready(function() {
        tinyMCE.execCommand('mceAddControl', false, 'editor1');
    }
    
    0 讨论(0)
提交回复
热议问题