if(this.initialized){
var bd = (this.doc.body || this.doc.documentElement);
//this.cleanUpPaste(); -- this is done else where and causes havoc..
+
+ // remove content editable. (blocks)
+ new Roo.htmleditor.FilterAttribute({node : bd, attrib_black: [ 'contenteditable' ] });
+
var html = bd.innerHTML;
if(Roo.isSafari){
var bs = bd.getAttribute('style'); // Safari puts text-align styles on the body element!
usage:
-- add to document..
- new Roo.htmleditor.BlockFigure{
+ new Roo.htmleditor.BlockFigure{
image_src : 'http://www.google.com',
caption : 'test',
- }
+ }
-- load document, and search for elements of this...
Roo.DomQuery.select('*[data-block])
// loop each and call ctor ({node : xxx})
image_width : '',
image_height : '',
+ // used by context menu
+
context : { // ?? static really
image_width : {
title: "Width",
width: 220
}
},
-
+ /**
+ * create a DomHelper friendly object - for use with
+ * Roo.DomHelper.markup / overwrite / etc..
+ */
toObject : function()
{
img,
{
tag: 'figcaption',
- 'data-name' : 'caption',
contenteditable : true,
style : 'text-align:left',
html : this.caption
]
};
},
+
readElement : function(node)
{
this.image_src = this.getVal(node, 'img', 'src');
updateElement : function(node)
{
Roo.DomHelper.overwrite(node, this.toObject());
-
+ },
+ toHTML : function()
+ {
+ Roo.DomHelper.markup(this.toObject());
},
getVal : function(node, tag, attr, style)