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 } } }