File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ <h2>Bi-directional Text Demo</h2>
6060 < input type ="radio " id ="ltr " name ="direction "/> < label for ="ltr "> LTR</ label >
6161 < input type ="radio " id ="rtl " name ="direction "/> < label for ="rtl "> RTL</ label >
6262 </ fieldset >
63+ < fieldset >
64+ HTML document direction:
65+ < input type ="radio " id ="htmlltr " name ="htmldirection "/> < label for ="htmlltr "> LTR</ label >
66+ < input type ="radio " id ="htmlrtl " name ="htmldirection "/> < label for ="htmlrtl "> RTL</ label >
67+ </ fieldset >
6368 < fieldset >
6469 < input type ="checkbox " id ="rtlMoveVisually "/> < label for ="rtlMoveVisually "> Use visual order for arrow key movement.</ label >
6570 </ fieldset >
@@ -80,6 +85,13 @@ <h2>Bi-directional Text Demo</h2>
8085 editor . setOption ( "direction" , dirRadios [ "rtl" ] . checked ? "rtl" : "ltr" ) ;
8186} ;
8287
88+ var HtmlDirRadios = { ltr : document . getElementById ( "htmlltr" ) ,
89+ rtl : document . getElementById ( "htmlrtl" ) } ;
90+ HtmlDirRadios [ "ltr" ] . checked = true ;
91+ HtmlDirRadios [ "rtl" ] . onchange = HtmlDirRadios [ "ltr" ] . onchange = function ( ) {
92+ document . dir = ( HtmlDirRadios [ "rtl" ] . checked ? "rtl" : "ltr" ) ;
93+ } ;
94+
8395var moveCheckbox = document . getElementById ( "rtlMoveVisually" ) ;
8496moveCheckbox . checked = editor . getOption ( "rtlMoveVisually" ) ;
8597moveCheckbox . onchange = function ( ) {
Original file line number Diff line number Diff line change 55 font-family : monospace;
66 height : 300px ;
77 color : black;
8+ direction : ltr;
89}
910
1011/* PADDING */
You can’t perform that action at this time.
0 commit comments