npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ckeditor5-table-classes

v8.0.0

Published

A plugin for ckedito5 that helps assign custom classes to tables through the ui

Readme

ckeditor5-table-classes

npm version Dependency Status devDependency Status

About

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

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 plugin

import TableClassesPlugin from 'ckeditor5-table-classes/src/tableclasses;

Import toolbar icons (optional)

import Icon1 from 'path-to-icon/iconfile1.svg;
import Icon2 from 'path-to-icon/iconfile2.svg;

Configure plugin

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.

TableClasses options

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,

Use

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.