Issue #898Opened February 26, 2018by NorthstarTech0 reactions

editor.getHtml() outside the iframe of grapesjs.

Question

How should I get the getHtml() outside the grapesjs editor. I have a save button outside the iframe of editor. I am not getting the current html when I click the save button.

Help Needed.

Answers (3)

alvimFebruary 26, 20180 reactions

You should get it by editor.getHtml().

If your editor is inside an iFrame and you're executing code in a parent window, you could access it like this:

var indexOfIFrame = 0;
window.frames[indexOfIFrame].editor.getHtml()

Is this what you're looking for?

artfMarch 2, 20180 reactions

Sorry @NorthstarTech but I totally didn't get what you're talking about

JordanTGVGNovember 29, 20180 reactions

I have a issue in Edge browser, i cannot get the html from the editor with:

window.frames[indexOfIFrame].editor.getHtml()

in chrome and mozzila is working good, any ideas?

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.