[Question]: Doctype in the canvas iframe
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)
which causes it to be in quirks mode
Which browser?
@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 Mac OS Chrome, Safari and Firefox.
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 need so that we can investigate further.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #973
[Question]: Doctype in the canvas iframe
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 intentio...
Issue #2008
[Question]The canvas turns dark and unmodifiable on adding a large piece of custom html.
I used to add custom html with editor.addComponent(). It works well at most of the time, but when I try to insert a large piece of HTML whi...
Issue #1888
[Question] Add custom html inside canvas
Hi there, I'm using grapes to export a custom json with all the information i need, instead of HTML and CSS. For doing that I'm parsing the...
Issue #1906
Components & Js - Load Template
Hey, I have a component which has a JS attached to it. Everything is created using the JS. When I drag and drop my block for the first time...
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.