如何从 TinyMCE textarea 中删除图像和 Table 选项?

How do I remove Image and Table option from TinyMCE textarea?

每次我在文本区域内单击以键入时,都会显示这两个选项。我不需要它们。我尝试查看 TinyMCE 网站,但找不到任何内容。希望有人能帮我找到解决办法。

这是我的 tinyMCE.js 代码

var useDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;

[tinymce.init({
    selector: "textarea",
    plugins:
        "print preview paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen codesample charmap hr nonbreaking toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons",
    toolbar: "undo redo | charmap emoticons | bold italic",
    toolbar_sticky: true,
    autosave_ask_before_unload: true,
    autosave_interval: "30s",
    autosave_prefix: "{path}{query}-{id}-",
    autosave_restore_when_empty: false,
    autosave_retention: "2m",
    image_advtab: true,
    branding: false,
    link_list: \[
        { title: "My page 1", value: "https://www.tiny.cloud" },
        { title: "My page 2", value: "http://www.moxiecode.com" },
    \],
    image_list: \[
        { title: "My page 1", value: "https://www.tiny.cloud" },
        { title: "My page 2", value: "http://www.moxiecode.com" },
    \],
    image_class_list: \[
        { title: "None", value: "" },
        { title: "Some class", value: "class-name" },
    \],
    importcss_append: true,

    template_cdate_format: "\[Date Created (CDATE): %m/%d/%Y : %H:%M:%S\]",
    template_mdate_format: "\[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S\]",
    height: 300,
    image_caption: true,
    quickbars_selection_toolbar: "bold italic | h2 h3 blockquote",
    noneditable_noneditable_class: "mceNonEditable",
    toolbar_mode: "sliding",
    skin: useDarkMode ? "oxide-dark" : "oxide",
    content_css: useDarkMode ? "dark" : "default",
    content_style:
        "body { background-color: rgba(0,0,0,0.3); color: #ebfdffff; font-family:Helvetica,Arial,sans-serif; font-size:14px }",
    oninit: "postInitWork",
});

您只需要从 plugins 中删除 quickbars

演示代码如下: https://codepen.io/michael-vascue/pen/MWpOmVB?editors=1011

tinymce.init({
    selector: "textarea#basic-example",
    height: 500,
    menubar: false,
     plugins:
        "print preview paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen codesample charmap hr nonbreaking toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap  emoticons",
    toolbar: "undo redo | charmap emoticons | bold italic",
    toolbar_sticky: true,
    autosave_ask_before_unload: true,
    autosave_interval: "30s",
    autosave_prefix: "{path}{query}-{id}-",
    autosave_restore_when_empty: false,
    autosave_retention: "2m",
    image_advtab: true,
    branding: false,
    link_list: [
        { title: "My page 1", value: "https://www.tiny.cloud" },
        { title: "My page 2", value: "http://www.moxiecode.com" },
    ],
    image_list: [
        { title: "My page 1", value: "https://www.tiny.cloud" },
        { title: "My page 2", value: "http://www.moxiecode.com" },
    ],
    image_class_list: [
        { title: "None", value: "" },
        { title: "Some class", value: "class-name" },
    ],
    importcss_append: true,
    template_cdate_format: "\[Date Created (CDATE): %m/%d/%Y : %H:%M:%S\]",
    template_mdate_format: "\[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S\]",
    height: 300,
    image_caption: true,
    quickbars_selection_toolbar: "bold italic | h2 h3 blockquote",
    noneditable_noneditable_class: "mceNonEditable",
    toolbar_mode: "sliding",
    skin: "oxide-dark",
    content_css: "dark",
    content_style:
        "body { background-color: rgba(0,0,0,0.3); color: #ebfdffff; font-family:Helvetica,Arial,sans-serif; font-size:14px }",
    oninit: "postInitWork"
});