Skip to content
Open
Changes from all commits
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console logs

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