Issue #1230💬 AnsweredOpened June 25, 2018by pintor-mato0 reactions

Doctype in the canvas iframe

Quick answerby artf

which causes it to be in quirks mode Which browser?

Read full answer below ↓

Question

Hey @artf, I noticed the canvas iframe doesn't appear to have any doctype set on it, which causes it to be in quirks mode. Is this intentional? I'd like to set it to <!DOCTYPE html>, but doing so causes some positioning issues that you can see in this screenshot and demo. Would you be open to a pull request that would allow the doctype to get set? I feel like exposing this in a config option (either a doctype string or perhaps a quirksMode boolean) would be the safest thing to do, but would like to get your thoughts before I continue exploring this.

Answers (3)

artfJune 28, 2018

which causes it to be in quirks mode

Which browser?

tomichalJuly 6, 2018

@artf One issue I noticed with the lack of doctype is with HEX color definitions. If a user defines a HEX color as, e.g.: "fff", rather than "#fff", this will work in the editor, but once the page is rendered inside a HTML with doctype specified, that "fff" color definition fails. Tested this on Ma...

no-response[bot]July 8, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we ne...

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.