example showing the issue
http://jsbin.com/nikekogeqe/4/edit
<polymer-element name="custom-element" noscript>
<template>
<!-- formatblock(h1) does not work under the polyfill -->
<div id="wrapper">
<content></content>
</div>
<!-- formatblock(h1) works under the polyfill -->
<!--<content></content>-->
</template>
</polymer-element>
<custom-element id="myCustomElement" contenteditable="true">
<p>test</p>
</custom-element>
After creating and selecting a range that includes the myCustomElement and executing something like
document.executeCommand("formatblock", isIE ? "
" : "h1");
Calling innerHtml on the myCustomElement returns
but the element is rendered correctly.
calling invalidateShadowRenderer(); after executing the command
fixes the innerHtml, but the element is not rendered correctly.