Skip to content
Snippets Groups Projects
Commit db396a13 authored by rhenck's avatar rhenck
Browse files

[editor] TextEditor: Replace old indent level parse logic

parent a293dac0
No related branches found
No related tags found
No related merge requests found
......@@ -36,10 +36,7 @@ export const Indent = Extension.create<IndentOptions>({
renderHTML: attributes => (
{ style: `padding-left: ${attributes.indent * this.options.paddingMultiplier}px` }
),
parseHTML: element => {
const level = Number(element.getAttribute('style'));
return level && level > this.options.minLevel ? level : null;
}
parseHTML: element => Number(element.style.paddingLeft.slice(0, -2)) / this.options.paddingMultiplier
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment