微小的 MCE 编辑器光标是指针而不是文本


Tiny MCE Editor cursor is pointer not text

在我的小MCE编辑器中,悬停时光标是指针,应该在文本中。当将鼠标悬停在 MCE 编辑器上时,我没有任何方法或方法可以将光标更改为文本。编辑器的文档也没有给出任何想法。

在 tinymce 初始化函数中添加一个选项

setup : function(ed) {
                  ed.on("click", function() {
                      ed.focus();
                  });
              }

现在你的代码会喜欢这样

tinymce.init({
    selector: "textarea",
    theme: "modern",
    width: '100%',
    plugins: ["advlist autolink lists link image charmap print preview anchor","searchreplace visualblocks code fullscreen",
              "insertdatetime media table contextmenu paste textcolor"
              ],
    toolbar: " bold italic underline | alignleft aligncenter",
    setup : function(ed) {
        ed.on("click", function() {
            ed.focus();
        });
    }
});

您好,光标在将鼠标悬停在 tinymce 的 body 元素上时会发生变化。所以我在 init 上想到了这个选项:

content_style: "body { min-height: 225px;}"

根据您的 Tinymce 窗口高度更改最小高度的大小。