我将非常感谢您的帮助,您会看到:我正在尝试获取构建SimpleMDE编辑器的 qooxdoo 小部件。您可以在操场上查看我的测试代码:
qx.Class.define("MdEditor", {
extend: qx.ui.core.Widget,
construct: function() {
this.base(arguments);
this.addListenerOnce("appear", this.__appearRenderer, this);
},
members: {
__appearRenderer: function() {
qx.bom.Stylesheet.includeFile('https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css');
var dynLoader = new qx.util.DynamicScriptLoader (
["https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"]
);
dynLoader.addListenerOnce("ready", function(e) {
this.debug("Simple MDE editor loaded");
var contentEl = this.getContentElement();
var editor = new SimpleMDE({
element: contentEl.getDomElement(),
spellChocker: false
});
}, this);
dynLoader.start();
},
_createContentElement: function() {
return new qx.html.Input("textarea");
}
}
});
var win = new qx.ui.window.Window("Simple MDE");
win.setWidth(400);
win.setHeight(280);
win.setShowMinimize(false);
win.setLayout(new qx.ui.layout.Grow());
var compo = new qx.ui.container.Scroll();
compo.add(new MdEditor());
win.add(compo);
this.getRoot().add(win, {left:20, top:20});
win.open();
实际上该实例已创建并显示,但是当您在可见空间之外写入文本时,“预期”滚动条不会显示,并且在控制台我收到此错误Error in property scrollY of class qx.ui.core.scroll.ScrollPane in method setScrollY with incoming value '131': Is invalid!
。
我试图显示本机滚动条SimpleMDE
但没有成功。现在,我想显示由 qooxdoo 管理的滚动条,但不知道如何存档。