Opened 12 years ago

Closed 12 years ago

#3424 closed defect (fixed)

Editor 2 Widget Can not Support Mulitple Instances with different toolbarTemplatePath properties

Reported by: guest Owned by: liucougar
Priority: high Milestone: 0.9
Component: Editor Version: 0.4.2
Keywords: Cc:
Blocked By: Blocking:

Description

I'm not sure if this is by design or a bug but a jMaki user would like to use two separate Editor widgets in the same page with different toolbars that use two different templates.

Example extending test_Editor2Code.html test:

this.editor0 = dojo.widget.createWidget("Editor2", {toolbarTemplatePath: dojo.uri.dojoUri("tests/widget/Editor/EditorToolbarLight.html"), height: 100, shareToolbar: false}, document.getElementById("fooTest"));

dojo.event.connect(this.editor0, "editorOnLoad", dojo.lang.hitch(this, function() { this.editor0Loaded=true; })); dojo.event.connect(this.editor0, "save", dojo.lang.hitch(this, function() {

dojo.debug("editor0");

})); this.editor1 = dojo.widget.createWidget("Editor2", {toolbarTemplatePath: "../../../tests/widget/Editor/EditorToolbarMedium.html", height: 100, shareToolbar: false}, document.getElementById("barTest")); dojo.event.connect(this.editor1, "editorOnLoad", dojo.lang.hitch(this, function() { this.editor1Loaded=true; })); dojo.event.connect(this.editor1, "save", dojo.lang.hitch(this, function() {

dojo.debug("editor1");

}));

} dojo.addOnLoad(function() {

editorTest();

}

);

All I have done is added a secondary template and changed the toolbarTemplatePath.

Which toolbarTemplatePath wins is not consistent and either way both widgets have the same toolbar.

Is there a way to have different toolbars in the same page?

Attachments (2)

t2.html (1.6 KB) - added by guest 12 years ago.
Main Test File (copy this into your /tests/widgets/Editor directory
EditorToolbarMedium.html (2.4 KB) - added by guest 12 years ago.
copy this file to your tests/widgets/Editor directory

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by guest

Attachment: t2.html added

Main Test File (copy this into your /tests/widgets/Editor directory

Changed 12 years ago by guest

Attachment: EditorToolbarMedium.html added

copy this file to your tests/widgets/Editor directory

comment:1 Changed 12 years ago by Adam Peller

Component: GeneralEditor
Owner: changed from anonymous to liucougar

comment:2 Changed 12 years ago by bill

Milestone: 0.9
Resolution: fixed
Status: newclosed

This is working w/the newly redesigned Editor. Just see test_Editor.html for an example.

Note: See TracTickets for help on using tickets.