[QUESTION] General editor updates using editor.on('update') event
Question
Hi! Is there a way to get general, last editor updates using editor.on('update') event? Something like this: editor.on('update', e => { // get the event // get the specific, recent updates (HTML and CSS) })
Answers (2)
Hello. You can declare variables for html, css and js and their value is going to get updated every time when editor change event is triggered.
change() {
this.html = editor.getHtml();
this.css = editor.getCss();
this.js = editor.getJs();
}
editor.on('change', this.change);
I've found another available event, editor.on('change'), but it seems difficult to read the HTML and CSS updates from this event
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1066
[QUESTION] Get content with inline CSS
I've been looking for some explanation and I found that some email clients blocks CSS... I would like to know if is there some way to get e...
Issue #2404
Question: how to observe children changes in component
Is there an easy way to subscribe/listen to changes in the components/children of my custom component type? Perhaps an event I can subscrib...
Issue #574
Using Grapes with Zeronet.
Is there a way to use grapesjs with zeronet? https://zeronet.io/ You can create sites on zeronet but to add headers, banners and other thin...
Issue #1112
[Question]How to add a new event to asset images
Hello, is there a way to add a new event to the AssetImageView, something like 'onRemove'. I overwritten the addAsset function from asset m...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.