:
$("#html_template").bind('load', function() {
function loadScript(url, callback)
{
var head = this.getElementsByTagName('head')[0];
var script = this.createElement('script');
script.type = 'text/javascript';
script.src = url;
script.onreadystatechange = callback;
script.onload = callback;
head.appendChild(script);
}
function e(){
var alleditableElement = this.getElementsByClassName("editable");
$(alleditableElement).each(function(i,v){
v.setAttribute( 'contenteditable', true );
document.getElementById('html_template').contentWindow.CKEDITOR.inline(v,{ toolbar : [ { name: 'basicstyles', items : [ 'Bold','Italic'] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList' ] } ] });
});
};
var iframedoc=document.getElementById('html_template').contentWindow.document;
iframedoc.loadScript=loadScript;
iframedoc.e=e;
iframedoc.loadScript('http://cdn.ckeditor.com/4.4.6/standard-all/ckeditor.js',function(){iframedoc.e()});
});
.