Issue #2237💬 AnsweredOpened September 2, 2019by gabd14111 reactions

General editor updates using editor.on('update') event

快速解答by olgertpysqyli1

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', t...

Read full answer below ↓

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)

olgertpysqyliSeptember 3, 2019

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);

gabd1411September 2, 2019

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.