fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

7 years ago
Demo.RichEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-rich-editor"
},
render: function () {
7 years ago
var self = this;
7 years ago
BI.createWidget({
7 years ago
type: "bi.absolute",
7 years ago
element: this,
7 years ago
items: [{
el: {
type: "bi.rich_editor",
cls: "bi-border",
ref: function () {
self.editor = this;
}
},
left: 10,
top: 10,
bottom: 10,
right: 10
7 years ago
}]
7 years ago
});
7 years ago
},
7 years ago
mounted: function () {
7 years ago
var image = BI.DOM.getImage("测试");
var src = image.src;
var style = image.style;
this.editor.setValue("<div>这是一条<font size=\"4\" color=\"#009de3\">测试</font>数据<img class=\"rich-editor-param\" width='" + image.width + "' height='" + image.height + "' src='" + src + "' style='" + style + "' /></div>");
7 years ago
this.editor.setBackColor("#aacf53");
7 years ago
}
});
BI.shortcut("demo.rich_editor", Demo.RichEditor);