Editar elementos dentro de iframe con contentEditable="true"
Frecuentes
Visto 2,149 veces
1
I have an iframe inside my html code like this.
<div>
<iframe src="demo.html"></iframe>
</div>
The demo.html contains some tags with the contentEditable="true" attribut like this.
<div>
<p contentEditable="true">bla bla bla bla bla</p>
.
.
.
</div>
when i open the demo.html file separately i can edit the p tag without problems, however when i open the html file that contain the iframe i cannot edit the paragraph.
Please any idea on how to fix this.
Gracias
2 Respuestas
0
Usually I see contentEditable div or an iframe. I'd like to know more as well if you find out.
respondido 27 nov., 13:02
0
<!-- /enabled jayscript/ -->
<div>
<!-- .load demo.html content -->
<iframe src="demo.html" style="">You do not support iframes...</iframe>
</div>
<!-- Below is code in demo.html
.modify demo.html content -->
<br><br><b>Demo.html</b><br>
<div contenteditable="true">
Blah blah blah
</div>
<!-- \enabled jayscript\ -->
This seemed to work for me in modern Chrome. Just make sure to use the contenteditable attribute on div tags and also set the dimensions of the iframe if this does not work. In this example I also used a library I have been creating called jayscript, so excuse the comments that are meant for that. Tested and works without jayscript nevertheless... If this still doesn't work for you, I don't know what your problem is (need to be more specific)..
Respondido el 05 de enero de 17 a las 20:01
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas html iframe contenteditable or haz tu propia pregunta.
also, there is no demo.html for me to put in iframe so my snippet shows them seperately. - Cannicida