Demo.RichEditor = BI.inherit(BI.Widget, { props: { baseCls: "demo-rich-editor" }, render: function () { var self = this; BI.createWidget({ type: "bi.absolute", element: this, items: [{ el: { type: "bi.rich_editor", cls: "bi-border", ref: function () { self.editor = this; } }, left: 10, top: 10, bottom: 10, right: 10 }] }); }, mounted: function () { var image = BI.DOM.getImage("测试"); var src = image.src; var style = image.style; this.editor.setValue("
这是一条测试数据
"); this.editor.setBackColor("#aacf53"); } }); BI.shortcut("demo.rich_editor", Demo.RichEditor);