There's any way to get only math content as the original latex? So basically, I want to maintain core.getContents() behavior, but instead of html katex, get other html inserted plus the original latex for each node.
Context: I have a CMS where I can edit content using this editor and then save it into a database. One of the problems here is the size of the latex content after compiled by katex and some errors when re-rendering the katex html at the other app.
You need to get it with 'getContents" and edit it yourself.
const dom = this._d.createRange().createContextualFragment(editorInstance.getContent());
const katex = dom.querySelectorAll('.sekatex');
There's any way to get only math content as the original latex? So basically, I want to maintain
core.getContents()
behavior, but instead of html katex, get other html inserted plus the original latex for each node.Context: I have a CMS where I can edit content using this editor and then save it into a database. One of the problems here is the size of the latex content after compiled by katex and some errors when re-rendering the katex html at the other app.
Current behavior:
From this:
Get this:
Desired behavior
From this:
Get something like this:
Version
Suneditor: 2.44.3