简体   繁体   English

使用javascript将内容从iframe contenteditable绘制到html5画布上

[英]drawing contents from iframe contenteditable onto an html5 canvas with javascript

有没有办法在html5画布上绘制或填充iframe的内容,其中contenteditable设置为true?

No. You cannot capture the browser's rendering of HTML elements as a picture with a canvas. 不能。您无法将浏览器的HTML元素呈现捕获为带有画布的图片。

The only thing close to what you are describing is that you can take a serialized SVG file, get the browser to render it as an img element, and then use drawImage() to write that image to the canvas . 与您描述的唯一相近的是,您可以获取序列化的SVG文件,让浏览器将其呈现为img元素,然后使用drawImage()将该图像写入画布

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM