首页 > 解决方案 > TinyMCE:表中新添加或自定义添加的属性不起作用

问题描述

我使用 TinyMCE 将自定义属性添加到我的表属性中。如您所见,但每当我尝试申请时,这些课程都不起作用。你可以看看我的代码。initValues: { height: 500, menubar: false, statusbar: false, visual: false, visual_table_class: 'my-custom-class',

    plugins: [
      "preview",
      "table",
      "fontselect",
      "image",
      "hr",
      "advlist autolink lists link image charmap print preview anchor",
      "searchreplace visualblocks code fullscreen",
      "insertdatetime media table paste code help wordcount",
    ],
    toolbar:
      "preview | undo redo| table | image | hr |fontselect | fontsizeselect |forecolor | bold italic | \
      alignleft aligncenter alignright alignjustify",
    font_formats:
      "Andale Mono=andale mono,times; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Book Antiqua=book antiqua,palatino; Comic Sans MS=comic sans ms,sans-serif; Courier New=courier new,courier; Georgia=georgia,palatino; Helvetica=helvetica; Impact=impact,chicago; Symbol=symbol; Tahoma=tahoma,arial,helvetica,sans-serif; Terminal=terminal,monaco; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva; Webdings=webdings; Wingdings=wingdings,zapf dingbats",
    fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt",
    table_class_list: [
      { title: "None", value: "" },
      { title: "No Border", value: "table_no_border" },
    ],
    table_cell_class_list: [
      { title: "None", value: "" },
      { title: "Dog", value: "dog" },
      { title: "Cat", value: "cat" },
    ],
    table_row_class_list: [
      { title: "None", value: "" },
      { title: "No Border", value: "table_row_no_border" },
      {
        title: "Border",
        menu: [
          { title: "Red border", value: "table_row_red_border", color:'#ff0000' },
          { title: "Blue border", value: "table_row_blue_border" },
          { title: "Green border", value: "table_row_green_border" },
        ],
      },
    ],

在此处输入图像描述

标签: vue.jstinymceeditor

解决方案


推荐阅读