Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/fromRedactor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const trimChildString = (child: any) => {
return true
}
const getDomAttributes = (child: any) => {
console.log(child)
return {
[child.nodeName]: child.nodeValue
}
Expand Down Expand Up @@ -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 } }
}
Expand Down
Loading