JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › General Discussions › editor getHTML() return too many css › Reply To: editor getHTML() return too many css
November 22, 2022 at 2:35 pm
#104009
Participant
Hi,
You can select every child element, remove the style property, and then get the inner HTML.
const table = document.querySelector(‘table’);
table.removeAttribute(‘style’);
const tableElements = table.querySelectorAll(‘*’);
tableElements.forEach(el => el.removeAttribute(‘style’))
console.log(table.innerHTML);
I hope this helps, if not, do not hesitate to contact us!
Best Regards,
Svetoslav Borislavov
Smart UI Team
https://www.htmlelements.com/
-
This reply was modified 2 years, 4 months ago by
svetoslav_borislavov.