TinyMce - 无法在弹出窗口上设置内容

问题描述 投票:0回答:0

我正在使用 TinyMCE v6。它正在 popup 上初始化。 在弹出窗口中对其进行初始化后,我正在设置其内容。通常它有效,但有时,内容不显示任何内容并且即使单词计数器显示正确的数字它也变得不可点击

我在控制台日志中看不到任何错误,但是当我尝试将任何内容插入文本区域时,控制台显示;

我在初始化 TinyMce 时的配置如下

  $(document).ready(()=>{
  tinymce.init({
            selector: "#editor",
            plugins: "quickbars image autoresize link autolink lists advlist visualblocks emoticons insertdatetime wordcount table",
            toolbar: 'mergeTagButton image | undo redo | formatgroup aligngroup numlist bullist | '
                + 'link emoticons | tablegroup',
            toolbar_groups: {
                formatgroup: {
                    icon: 'format',
                    tooltip: 'Formatting',
                    items: 'fontfamily fontsize bold italic underline strikethrough | forecolor backcolor | superscript subscript | removeformat'
                },
                tablegroup: {
                    icon: 'table',
                    tooltip: 'Table',
                    items: 'table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol'
                },
                aligngroup: {
                    icon: 'paragraph',
                    tooltip: 'Paragraph format',
                    items: 'h1 h2 h3 | alignleft aligncenter alignright alignjustify | outdent indent'
                },
            },
            entity_encoding: 'raw',
            menubar: 'edit insert format table',
            quickbars_insert_toolbar: '',
            visualblocks_default_state: true,
            forced_root_block: 'div',
            image_caption: true,
            end_container_on_empty_block: true,
            min_height: 300
     })
     });

PS: 我也在使用没有弹出窗口的 tinymce,它总是有效。但是在弹出窗口上,它不起作用有时

任何帮助将不胜感激, 谢谢!

javascript jquery tinymce
© www.soinside.com 2019 - 2024. All rights reserved.