If I drag a Image for example into a <div> tag, it leaves the div tag
unchanged and just inserts the image into the text child content.
However, if I copy an image into a custom element that has an anonymous
div content, it will split the custom element instead.
Here is an example page that shows the problem I'm having.
http://hogfans.com/editor/container.html
Notice that dragging the image into the form(red border) works as
expected. However, dragging the image into the custom tag (blue
border), it will be split after the drop.
What I want to prevent is mozilla splitting my custom container into 2
different elements. I want it to treat it like it does the <div> tag.
Is this possible?
Here is the source for the example for reference.
***************container.html*******************
<html>
<head>
<style type="text/css">
mycontainer {
-moz-binding: url('container.xml#container');
}
</style>
</head>
<body onload="document.designMode='on'">
Drag Image<img> into form(red border)<br>
<form style="border:1px solid red">
some text in a normal html form
</form>
Drag Image<img> into custom tag with blue border<br>
<mycontainer class="mycontainer">
some text in the custom container
</mycontainer>
</body>
</html>
****************container.xml********************
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="container">
<content>
<html:div style="border: 1px solid blue">
<children/>
</html:div>
</content>
</binding>
</bindings>
_______________________________________________
dev-tech-editor mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-editor