diff --git a/demo/js/base/editor/demo.rich_editor.js b/demo/js/base/editor/demo.rich_editor.js index 80e0c8b07..e618499ec 100644 --- a/demo/js/base/editor/demo.rich_editor.js +++ b/demo/js/base/editor/demo.rich_editor.js @@ -4,23 +4,21 @@ Demo.RichEditor = BI.inherit(BI.Widget, { }, render: function () { var self = this; - this.editor = BI.createWidget({ - type: "bi.rich_editor", - cls: "bi-border", - width: 600, - height: 400 - }); BI.createWidget({ - type: "bi.vertical", + type: "bi.absolute", element: this, - hgap: 30, - vgap: 50, - items: [this.editor, { - type: "bi.button", - text: "focus", - handler: function () { - self.editor.focus(); - } + items: [{ + el: { + type: "bi.rich_editor", + cls: "bi-border", + ref: function () { + self.editor = this; + } + }, + left: 10, + top: 10, + bottom: 10, + right: 10 }] }); }, @@ -30,6 +28,7 @@ Demo.RichEditor = BI.inherit(BI.Widget, { var src = image.src; var style = image.style; this.editor.setValue("