Ignore:
Timestamp:
05/18/05 21:15:06 (15 years ago)
Author:
yermol
Message:

htmlarea.js

. added workaround fix for NASTY FIREFOX BUG resulting in the infamous

uneditable area problem (exception on designMode="on" issue -
refer to bug:


https://bugzilla.mozilla.org/show_bug.cgi?id=207842


and this thread:


http://xinha.gogo.co.nz/punbb/viewtopic.php?id=229


. trailing <BR>'s are no longer stripped out of the document. This

was wreaking havoc on EnterParagraphs?. It's not clear whether or not
this is going to have unanticipated side-effects.

plugins/EnterParagraphs/enter-paragraphs.js

NOT FULLY FUNCTIONAL YET - DOESN'T HANDLE ALL CASES CORRECTLY,
but it's much better than it was I think.

. largely reworked.
. changed obfuscated variables names to make it more readable.
. expanded out nested (x ? y : z) constructs to make it more readable.
. added alot of comments.
. fixed a serious bug in findEachNodeUnder() that was not correctly

handling beginning and end node conditions.

. fixed design flaw that selected a non-existent insertion point for

placing the cursor.

. fixed several exceptions.
. now correctly handles lists by passing the back back to the Gecko

engine if we are in a list with the exception of being at the
first position in the first element in which case we insert
a paragraph before the list and move the cursor back to the first
item on the list.

Location:
branches/unified_backend/examples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/unified_backend/examples/full_example-body.php

    r121 r172  
    180180    } 
    181181 
    182     window.onload = xinha_init; 
     182    // calling xinha_init twice can cause a nasty little exception. 
     183    // window.onload = xinha_init; 
     184 
    183185  </script> 
    184186</head> 
     
    204206    ---------------------------------------------------------------------------> 
    205207 
    206         <div id="lipsum" style="display:none"> 
     208    <div id="lipsum" style="display:none"><h1>TEST</h1></div> 
     209 
     210        <div id="lipsumx" style="display:none"> 
    207211          <p>This is an example of a Xinha editor with extensive trace messages 
    208212                         turned on. To turn off trace messages, assuming you have the source, just 
     
    228232                         file from the Xinha_ub branch.</p> 
    229233        </div> 
     234 
    230235        <script src="full_example.js"></script> 
    231236 
  • branches/unified_backend/examples/full_example-menu.html

    r121 r172  
    3737      <legend>Plugins</legend> 
    3838      <label> 
     39        <input type="checkbox" name="plugins" value="EnterParagraphs"  /> EnterParagraphs 
     40      </label> 
     41      <label> 
    3942        <input type="checkbox" name="plugins" value="CSS"  /> CSS 
    4043      </label> 
     
    4649      </label> 
    4750      <label> 
    48         <input type="checkbox" name="plugins" value="FullScreen" checked /> FullScreen 
     51        <input type="checkbox" name="plugins" value="FullScreen" /> FullScreen 
    4952      </label> 
    5053      <label> 
    51         <input type="checkbox" name="plugins" value="CharacterMap" checked /> CharacterMap 
     54        <input type="checkbox" name="plugins" value="CharacterMap" /> CharacterMap 
    5255      </label> 
    5356      <label> 
     
    5558      </label> 
    5659      <label> 
    57         <input type="checkbox" name="plugins" value="ListType" checked /> ListType 
     60        <input type="checkbox" name="plugins" value="ListType" /> ListType 
    5861      </label> 
    5962 
    6063      <label> 
    61         <input type="checkbox" name="plugins" value="Stylist" checked /> Stylist 
     64        <input type="checkbox" name="plugins" value="Stylist" /> Stylist 
    6265      </label> 
    6366 
    6467      <label> 
    65         <input type="checkbox" name="plugins" value="TableOperations" checked /> TableOperations 
     68        <input type="checkbox" name="plugins" value="TableOperations" /> TableOperations 
    6669      </label> 
    6770 
    6871      <label> 
    69         <input type="checkbox" name="plugins" value="InsertAnchor" checked /> InsertAnchor 
     72        <input type="checkbox" name="plugins" value="InsertAnchor" /> InsertAnchor 
    7073      </label> 
    7174    </fieldset> 
  • branches/unified_backend/examples/simple_example.php

    r121 r172  
    3030    //  eg: _editor_url = "../"; 
    3131    // in this example we do a little regular expression to find the absolute path. 
    32     _editor_url  = document.location.href.replace(/examples\/simple_example\.html.*/, '') 
     32    _editor_url  = document.location.href.replace(/examples\/simple_example\.php.*/, '') 
    3333    _editor_lang = "en";      // And the language we need to use in the editor. 
    3434  </script> 
     
    190190 
    191191    <textarea id="TextArea1" name="TextArea1" rows="10" cols="80" style="width:100%"> 
    192          This is the content of TextArea1 from xinha_ub/examples/simple_example.html.<br> 
     192         This is the content of TextArea1 from xinha_ub/examples/simple_example.php.<br> 
    193193         In order to see the new debugging trace messages you will need to turn off 
    194194         popup blockers for this site.<br> 
     
    196196         commenting out or uncomments the _ddtOn() line. The same applies to the trace 
    197197         messages inside the HTMLArea object in htmlarea.js. 
     198         The version of EnterParagraphs in this editor should be largely fixed. If you notice 
     199         any problems please report them in the forums. 
    198200         </textarea> 
    199201 
Note: See TracChangeset for help on using the changeset viewer.