Changeset 11801

Show
Ignore:
Timestamp:
12/12/07 04:39:21 (7 months ago)
Author:
bill
Message:

Programmatic editor creation test (refs #287)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/tests/test_Editor.html

    r11778 r11801  
    2828        <h1 class="testTitle"><label for="editor1">Editor + Plugins Test</label></h1> 
    2929 
     30        <h2>Created from div</h2> 
    3031        <div style="border: 1px solid black;"> 
    3132                <div dojoType="dijit.Editor" id="editor1"><p>This instance is created from a div directly with default toolbar and plugins</p></div> 
     
    3435        <button onclick="console.log(dijit.byId('editor1').getValue().length)">getValue</button> 
    3536        <hr/> 
     37         
     38        <h2>Created from textarea,auto-expanding</h2> 
    3639        <div style="border: 1px dotted black;"> 
    3740                <h3><label for="thud">thud - from textarea</label></h3> 
     
    5457        </div> 
    5558        <hr/> 
     59         
     60        <h2>Optional toolbar buttons</h2> 
    5661        <div style="border: 1px dotted black;"> 
    5762                <h3><label for="blah">blah entry</label></h3> 
     
    6671        </div> 
    6772        <hr/> 
     73         
     74        <h2>Plugins specified</h2> 
    6875        <div style="border: 1px dotted black;"> 
    6976                <h3><label for="blah2">Another blah entry</label></h3> 
     
    7986                <h3>..after</h3> 
    8087        </div> 
     88        <hr/> 
     89 
     90        <h2>Programmatic creation</h2> 
     91        <div id="programmatic">This div will become an editor.</div> 
     92        <button 
     93                id="create" 
     94                onclick="new dijit.Editor({}, dojo.byId('programmatic')); dojo.query('#create').orphan();"> 
     95        create static editor 
     96        </button> 
     97        <div id="programmatic2">This div will become an auto-expanding editor.</div> 
     98        <button 
     99                id="create2" 
     100                onclick="new dijit.Editor({height: '', extraPlugins: ['dijit._editor.plugins.AlwaysShowToolbar']}, dojo.byId('programmatic2')); dojo.query('#create2').orphan();"> 
     101        create expanding editor 
     102        </button> 
    81103</body> 
    82104</html>