|
|
@ -27751,6 +27751,27 @@ BI.extend(BI.DOM, { |
|
|
|
ul.destroy(); |
|
|
|
ul.destroy(); |
|
|
|
} |
|
|
|
} |
|
|
|
return this._scrollWidth; |
|
|
|
return this._scrollWidth; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getImage: function (param) { |
|
|
|
|
|
|
|
var image = new Image(); |
|
|
|
|
|
|
|
var canvas = document.createElement("canvas"); |
|
|
|
|
|
|
|
$("body").append(canvas); |
|
|
|
|
|
|
|
var w = BI.DOM.getTextSizeWidth(param, 14) + 6; |
|
|
|
|
|
|
|
canvas.width = w; |
|
|
|
|
|
|
|
canvas.height = 16; |
|
|
|
|
|
|
|
var ctx = canvas.getContext("2d"); |
|
|
|
|
|
|
|
ctx.font = "14px Georgia"; |
|
|
|
|
|
|
|
ctx.fillStyle = "#ffffff"; |
|
|
|
|
|
|
|
ctx.fillText(param, 3, 14); |
|
|
|
|
|
|
|
$(canvas).destroy(); |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
width: w, |
|
|
|
|
|
|
|
height: 16, |
|
|
|
|
|
|
|
src: canvas.toDataURL("image/png"), |
|
|
|
|
|
|
|
style: "background-color: #3f8ce8; vertical-align: sub; margin: 0 3px;", |
|
|
|
|
|
|
|
alt: param |
|
|
|
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
});(function () { |
|
|
|
});(function () { |
|
|
|
var constantInjection = {}; |
|
|
|
var constantInjection = {}; |
|
|
@ -79737,20 +79758,12 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var instance = o.editor.instance; |
|
|
|
var instance = o.editor.instance; |
|
|
|
var image = new Image(); |
|
|
|
var image = new Image(); |
|
|
|
var canvas = document.createElement("canvas"); |
|
|
|
var attrs = BI.DOM.getImage(param); |
|
|
|
$("body").append(canvas); |
|
|
|
image.src = attrs.src; |
|
|
|
canvas.width = BI.DOM.getTextSizeWidth(param, 14) + 6; |
|
|
|
|
|
|
|
canvas.height = 16; |
|
|
|
|
|
|
|
var ctx = canvas.getContext("2d"); |
|
|
|
|
|
|
|
ctx.font = "14px Georgia"; |
|
|
|
|
|
|
|
ctx.fillStyle = "#ffffff"; |
|
|
|
|
|
|
|
ctx.fillText(param, 3, 14); |
|
|
|
|
|
|
|
image.src = canvas.toDataURL("image/png"); |
|
|
|
|
|
|
|
image.alt = param; |
|
|
|
image.alt = param; |
|
|
|
$(image).css({"background-color": "#3f8ce8", "vertical-align": "sub", "margin": "0 3px;"}); |
|
|
|
image.style = attrs.style; |
|
|
|
instance.getElm().element.append(image); |
|
|
|
instance.getElm().element.append(image); |
|
|
|
this._addBlank($(image)); |
|
|
|
this._addBlank($(image)); |
|
|
|
$(canvas).destroy(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|