X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=1ca0224ee8478a933907e4e4fb1add1c33366666;hb=4661ff928a7659d86219009f55c18ba89fe23059;hp=6b6210541d32f303fee960f3eb278abfb4878d44;hpb=b8318fff846dac97c7fca1ff5ad9db5b2508c79e;p=roojs1
diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js
index 6b6210541d..1ca0224ee8 100644
--- a/roojs-bootstrap-debug.js
+++ b/roojs-bootstrap-debug.js
@@ -27002,6 +27002,9 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
caption : '',
caption_display : 'block',
width : '100%',
+ cls : '',
+ href: '',
+ video_url : '',
// margin: '2%', not used
@@ -27170,6 +27173,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
var img = {
tag : 'img',
+ contenteditable : 'false',
src : this.image_src,
alt : d.innerText.replace(/\n/g, " "), // removeHTML..
style: {
@@ -27180,18 +27184,35 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
}
};
-
+ /*
'
',
-
+ */
- if (this.href) {
+ if (this.href.length > 0) {
img = {
tag : 'a',
href: this.href,
+ contenteditable : 'true',
+ cn : [
+ img
+ ]
+ };
+ }
+
+
+ if (this.video_url.length > 0) {
+ img = {
+ tag : 'div',
+ cls : this.cls,
+ frameborder : 0,
+ allowfullscreen : true,
+ width : 420, // these are for video tricks - that we replace the outer
+ height : 315,
+ src : this.video_url,
cn : [
img
]
@@ -27211,10 +27232,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
padding: '10px'
},
- frameborder : 0,
- allowfullscreen : true,
- src : this.video_src,
- cls : this.cls,
+
+
align : this.align,
cn : [
img,
@@ -27230,6 +27249,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
'font-style': 'italic',
display : this.caption_display
},
+ cls : this.cls.length > 0 ? (this.cls + '-thumbnail' ) : '',
html : this.caption
}
@@ -27241,8 +27261,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
readElement : function(node)
{
// this should not really come from the link...
- this.video_src = this.getVal(node, false, 'src');
- this.cls = this.getVal(node, false, 'class');
+ this.video_url = this.getVal(node, 'div', 'src');
+ this.cls = this.getVal(node, 'div', 'class');
this.href = this.getVal(node, 'a', 'href');
this.image_src = this.getVal(node, 'img', 'src');
@@ -29018,7 +29038,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, {
dbody.bgProperties = 'fixed'; // ie
//Roo.DomHelper.applyStyles(dbody, ss);
Roo.EventManager.on(this.doc, {
- //'mousedown': this.onEditorEvent,
+
'mouseup': this.onEditorEvent,
'dblclick': this.onEditorEvent,
'click': this.onEditorEvent,
@@ -29049,7 +29069,8 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, {
this.owner.fireEvent('initialize', this);
this.pushValue();
},
-
+ // this is to prevent a href clicks resulting in a redirect?
+
onPasteEvent : function(e,v)
{
// I think we better assume paste is going to be a dirty load of rubish from word..
@@ -29208,6 +29229,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, {
onEditorEvent : function(e)
{
+
if (e && (e.ctrlKey || e.metaKey) && e.keyCode === 90) {
return; // we do not handle this.. (undo manager does..)