Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15977 closed defect (invalid)

Programmatically created Editor is not mirrored

Reported by: ahmedasaleh Owned by:
Priority: undecided Milestone: tbd
Component: Editor Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

Using the test_Editor.html file to test the BIDI support for the Editor , it found that Programmatically created dijit.Editor is not mirrored when dir is specified on widget level.

<div id="programmatic" dir="rtl">This div will become an editor.</div>
	<button
		id="create"
		onclick="new dijit.Editor({}, dojo.byId('programmatic')); dojo.query('#create').orphan();">
	create static editor
	</button>
	<div id="programmatic2" dir="rtl">This div will become an auto-expanding editor.</div>
	<button
		id="create2"
		onclick="new dijit.Editor({height: '', extraPlugins: ['dijit._editor.plugins.AlwaysShowToolbar']}, dojo.byId('programmatic2')); dojo.query('#create2').orphan();">
	create expanding editor
	</button>

	<br><br>    
	<div id="programmatic3" dir="rtl">This div will become a programmatic editor in addOnLoad with creation-defined default content.</div>

Attachments (2)

editor.JPG (61.1 KB) - added by ahmedasaleh 7 years ago.
Programmatically created dijit.Editor is not mirrored when dir is specified on widget level
Editor.js.patch (602 bytes) - added by Douglas Hays 7 years ago.
patch from Hossam Katory (IBM, CCLA)

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by ahmedasaleh

Attachment: editor.JPG added

Programmatically created dijit.Editor is not mirrored when dir is specified on widget level

Changed 7 years ago by Douglas Hays

Attachment: Editor.js.patch added

patch from Hossam Katory (IBM, CCLA)

comment:1 Changed 7 years ago by bill

Component: GeneralDojoX Wires
Resolution: invalid
Status: newclosed

It's not mirrored because you didn't specify dir:"rtl" as a parameter to the constructor.

When creating widgets programatically, you need to specify all parameters to the widget constructor, rather than setting them on the DOMNode. Ex:

new Editor({dir: "rtl", ...}, srcNode);

comment:2 Changed 7 years ago by bill

Component: DojoX WiresEditor
Note: See TracTickets for help on using tickets.