From 488c6777ae0444090cf46b9e34346d83aee31ed2 Mon Sep 17 00:00:00 2001 From: raphj Date: Sun, 1 Dec 2024 20:13:59 +0100 Subject: [PATCH] Allow configuring the label and the category --- src/blocks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blocks.ts b/src/blocks.ts index 62f5f7c..70b599a 100644 --- a/src/blocks.ts +++ b/src/blocks.ts @@ -51,8 +51,8 @@ export default (editor: Editor, opt: PluginOptions = {}) => { editor.on('selector:add', selector => privateCls.indexOf(selector.getFullName()) >= 0 && selector.set('private', 1)) - const label = 'Flexbox'; - const category = 'Basic'; + const label = opt.label || 'Flexbox'; + const category = opt.category || 'Basic'; const attrsRow = attrsToString(rowAttr); const attrsCell = attrsToString(colAttr); const styleRow = `