From 01eccfee0a2552f6efd4258c099538961929c9b3 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 2 Aug 2022 14:25:51 +0200 Subject: [PATCH] Up setCustomParserCss TS --- src/editor/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/editor/index.ts b/src/editor/index.ts index e16cbf631..09e472afc 100644 --- a/src/editor/index.ts +++ b/src/editor/index.ts @@ -64,6 +64,13 @@ import defaults from './config/config'; import EditorModel from './model/Editor'; import EditorView from './view/EditorView'; +export type ParsedRule = { + selectors: string; + style: Record; + atRule?: string; + params?: string; +}; + export default class EditorModule implements IBaseModule { constructor(config = {}, opts: any = {}) { //@ts-ignore @@ -644,7 +651,7 @@ export default class EditorModule implements IBaseModule { * return result; * }); */ - setCustomParserCss(parser: any) { + setCustomParserCss(parser: (css: string, editor: EditorModule) => ParsedRule[]) { this.Parser.getConfig().parserCss = parser; return this; }