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)
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?
Sorry @NorthstarTech but I totally didn't get what you're talking about
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.
Issue #605
How we can save HTML
How we can save HTML without using editor.getHtml() and replace function. As, when we are using this in image upload then the existing vide...
Issue #999
how to get the canvas wrapper rows, columns & controls details within the JSON data format?
Hi, Thanks for your plugin. how can i get the dropped controls, rows & columns information like json data while click the save button. Here...
Issue #1706
[Question]: How to get href from rte?
I have this rte toolbar where you can type and click 'save' and it's going to create a link for the selected text. but the problem is that...
Issue #502
Hide a particular component in preview
Hi, Is it possible to hide "BannerOptionsBtn" component when I click preview button. I Used toHTML() function. And when I called editor.get...
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.