How to get HTML and CSS of a specific Component #3669
codingmachine16
started this conversation in
General
Replies: 2 comments
-
The solution is const wrapper = editor.getWrapper(); |
Beta Was this translation helpful? Give feedback.
0 replies
-
For styles you can use:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @artf
I searched a component from editor through below code
const wrapper = editor.getWrapper();
const el = wrapper.find("#header-placeholder")[0];
console.log(el);
Now I want to get HTML and CSS of this component like
console.log(el.getHtml()); and console.log(el.getCss());
How is is possible? I want to get html and css of specific component and store in DB table
but el.getHtml() and el.getCss() are generating error. Please suggest.
Beta Was this translation helpful? Give feedback.
All reactions