question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question]: Doctype in the canvas iframe

See original GitHub issue

Hi. This question has already been asked twice (here and here) but has never got an answer.

Is there a way to add <!DOCTYPE html> as the beginning of the canvas iframe so that the iframe will be in standards mode.

I need this since I am trying to use tinyMce as the custom RTE, and tinyMce requires standards mode.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
artfcommented, Jun 21, 2021

In the next release, I’ll add a new event helper that will allow editing iframe content before load:

editor.on('frame:load:before', ({ el }) => {
  const doc = el.contentDocument;
  doc.open();
  doc.write("<!DOCTYPE html>");
  doc.close();
});
1reaction
bgrand-chcommented, May 11, 2021

Hello,

For future questions or technical issues, which aren’t bugs, GitHub’s Discussions tab is the place to be.

Don’t forget to close this issue if it is resolved or write a new detailed message in Discussions -> Q&A category (and close this issue).

Thank you for your understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Embedding an Uploaded HTML page in an iFrame
A new page in a Canvas to which we will add the iframe. A basic understanding of the HTML editor in Canvas. If...
Read more >
HTMLCanvasElement becomes HTMLUnknownElement in ...
I'm having trouble with my Canvas element... I try to load a page with a Canvas element in an Iframe. when I try...
Read more >
<iframe>: The Inline Frame element - HTML - MDN Web Docs
This element includes the global attributes. Specifies a Permissions Policy for the <iframe> . The policy defines what features are available ...
Read more >
What is the iframe tag in HTML? - Educative.io
The iframe tag in HTML creates an inline rectangular frame that allows another HTML document to be embedded inside the current one.
Read more >
HTML Iframes Tag What is HTML Iframes? - TutorialBrain
Interview Questions & Answer ... 1. What are Iframes in HTML? HTML iframes are known as an inline frame. It allows us to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found