From 1ef95f1e3dbc6dd30fc708daf3bc00a8eb20a978 Mon Sep 17 00:00:00 2001 From: Shreya Kamble Date: Tue, 23 Dec 2025 16:55:05 +0530 Subject: [PATCH] feat: support for iindent --- src/fromRedactor.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fromRedactor.tsx b/src/fromRedactor.tsx index 21c4808..0d7711c 100644 --- a/src/fromRedactor.tsx +++ b/src/fromRedactor.tsx @@ -20,6 +20,7 @@ const trimChildString = (child: any) => { return true } const getDomAttributes = (child: any) => { + console.log(child) return { [child.nodeName]: child.nodeValue } @@ -476,6 +477,13 @@ export const fromRedactor = (el: any, options?:IHtmlToJsonOptions) : IAnyObject attrs: { ...elementAttrs['attrs'], 'data-sys-asset-uid': redactor['data-sys-asset-uid'] } } } + if (redactor['data-indent-level']) { + elementAttrs = { + ...elementAttrs, + attrs: { ...elementAttrs['attrs'], 'data-indent-level': redactor['data-indent-level'] } + } + delete redactor['data-indent-level'] + } elementAttrs = { ...elementAttrs, attrs: { ...elementAttrs['attrs'], "redactor-attributes": redactor } } }