Skip to content

Commit

Permalink
fix(warning): StyleMenu dropdown item to use data-attr instead of cus…
Browse files Browse the repository at this point in the history
…tom attr
  • Loading branch information
nileshgulia1 authored and wesleybl committed Jul 7, 2023
1 parent 826483f commit f48eaef
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/volto-slate/src/editor/plugins/StyleMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@ import './style.less';

export default function install(config) {
const { slate } = config.settings;
slate.styleMenu = slate.styleMenu || {};
slate.styleMenu.inlineStyles = slate.styleMenu.inlineStyles || [];

slate.styleMenu.inlineStyles = [
{
cssClass: 'cool-inline-text',
label: 'Cool Inline Text',
},
];
slate.styleMenu.blockStyles = [];
slate.buttons.styleMenu = (props) => <StyleMenu {...props} title="Styles" />;

slate.toolbarButtons.push('styleMenu');
slate.expandedToolbarButtons.push('styleMenu');

slate.styleMenu = {
inlineStyles: [],
blockStyles: [],
};
// slate.styleMenu = {
// blockStyles: [],
// };

return config;
}

0 comments on commit f48eaef

Please sign in to comment.