首页 > 解决方案 > 如何在 ckeditor5 配置中向表元素添加类?

问题描述

我正在编辑 ckeditor5 配置,我需要将自定义类添加到表中。我尝试了什么:

ckeditorConfigRegistry.add(config => ({
  toolbar: [...config.toolbar, 'fontColor', 'fontBackgroundColor'],
  table: {
    customClass: ["table", "table-bordered"]
  }
}));

也试过:

table: {
    class: "table table-bordered"
  }

和:

table: {
    attributes: {
      class: "table table-bordered"
  }
}

任何想法如何在配置中向表元素添加类?

标签: html-tableckeditor5

解决方案


推荐阅读