How to load an HTML file into the canvas?


For this, you can use the SVG <foreignObject> elements. Let us see an example:

<svg xmlns = "http://www.w3.org/2000/svg">
<foreignObject x = "0" y = "0" height = "500" width = "500">
   <body xmlns = "http://www.w3.org/1999/xhtml">
      <p>DEMO</p>
      <input type = "date"/>
   </body>
</foreignObject>
</svg>

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 29-Jan-2020

468 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements