Issue #908Opened February 28, 2018by sbarfurth0 reactions

[FEATURE REQUEST] Add custom classes to panels and other editor elements

Question

When using a UI framework that provides custom classes, it would be nice to be able to use these classes on things like panels, so you wouldn't have to rewrite the CSS.

A possible syntax may be:

panelManager.addPanel({
  id: 'myNewPanel',
  visible    : true,
  buttons    : [...],
  classes: ['myCustomClass', 'so-custom'],
});

It would also be useful to be able to do this after the fact for presets, using a setter for example.

panelManager.getPanel('panel').set('classes', ['addedClass']);

I could not find a way to do this yet, specifically for panels. Though I would consider this useful for any editor UI element.

Answers (2)

artfMarch 2, 20180 reactions

You can set attributes in this way

editor.Panels.addPanel({
	id: 'myNewPanel',
	...
	attributes: {'data-stuff': 'val1', 'classe': 'val2'}
})
lock[bot]September 18, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.