
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
ckeditor5-table-classes
Advanced tools
A plugin for ckedito5 that helps assign custom classes to tables through the ui
This is a plugin for ckeditor 5. It allows to assign custom classes to your tables. The classes are added to the Figure element that encapsulates a table:
<Figure class="table foo bar">
<table> .... </table>
</Figure>
In the above example the 'table' class is assigned automatically by the editor. The next two classes 'foo' and 'bar' are assigned by this plugin.

Install using NPM:
npm install ckeditor5-table-classes
To add the functionality of this plugin you should make a custom build of the editor. Follow the instructions here.
To load the plugin, configure ckeditor (e.g. edit file ckeditor.js) like this:
import TableClassesPlugin from 'ckeditor5-table-classes/src/tableclasses;
import Icon1 from 'path-to-icon/iconfile1.svg;
import Icon2 from 'path-to-icon/iconfile2.svg;
Assuming that the build is based on Classic Editor:
export default class ClassicEditor extends ClassicEditorBase {}
// Plugins to include in the build.
ClassicEditor.builtinPlugins = [
...
TableClassesPlugin,
...
],
ClassicEditor.defaultConfig = {
table: {
/*... other options here ...*/
tableToolbar: ['tableclass-style1', 'tableclass-style2', ... ]
},
TableClasses:{
items:[
{id:"style1", classes:'foo bar', icon:Icon1},
{id:"style2", classes:'fancy', icon:Icon2}
]
},
/* ... other options ... */
};
Note: the toolbar item names should have the format: tableclass-id, where id should be replaced by the respective id property as defined in TableClasses object.
The predifinded table classes can be customized in the 'TableClasses' object that is passed to the editor, as shown above. Many different classes can be defined that are identified by an id property. The following options are available for each item:
id : (string) a unique id that identifies the item,classes: (string, space separated) the classes that are going to be assigned to the table if this item is activated,icon: (optional)(icon object) icon for the respective toolbar button. If missing, a default icon is used,Select the entire table by clicking to the top-left handle. The table toolbar appears, from which the predefined items are available. Just click to one or more of them. The assigned classes stack for multiple activated items. You can identify between the items by their tooltip if no icons are loaded.
To observe any visual effect from the assigned classes you have to configure your css appropriately.
FAQs
A plugin for ckedito5 that helps assign custom classes to tables through the ui
The npm package ckeditor5-table-classes receives a total of 5 weekly downloads. As such, ckeditor5-table-classes popularity was classified as not popular.
We found that ckeditor5-table-classes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.