Menu

#10 everything in a single line (opera)

v0.9
open-accepted
pyrou
None
9
2008-03-14
2007-06-15
Anonymous
No

Using opera 9.10 the code-example always changes into a single line when i click into the box. (apparently the line breaks get lost somehow)

Discussion

  • pyrou

    pyrou - 2007-09-19

    Logged In: YES
    user_id=1695796
    Originator: NO

    THks will try to fix it

     
  • pyrou

    pyrou - 2007-09-19
    • priority: 5 --> 9
    • assigned_to: nobody --> pyrou
     
  • Mikeyb

    Mikeyb - 2007-10-18

    Logged In: YES
    user_id=1915426
    Originator: NO

    Patch for v0.9.6:

    to fix the "singleline" bug, please use:

    // get code from editor
    getCode : function() {
    var code = editor.innerHTML;
    code = code.replace(/<br>/gi,'\n'); //this line was added.
    code = code.replace(/\u2009/g,'');
    code = code.replace(/<.*?>/g,'');
    code = code.replace(/&lt;/g,'<');
    code = code.replace(/&gt;/g,'>');
    code = code.replace(/&amp;/gi,'&');
    return code;
    },

    // put code inside editor
    setCode : function() {
    var code = arguments[0];
    code = code.replace(/\u2009/gi,'');
    code = code.replace(/&/gi,'&amp;');
    code = code.replace(/</g,'&lt;');
    code = code.replace(/>/g,'&gt;');
    code = code.replace(/\r\n/g, '<br>'); //this line was added,
    code = code.replace(/\n/g, '<br>'); //and this one.
    editor.innerHTML = code;
    },

     
  • pyrou

    pyrou - 2007-10-24

    Logged In: YES
    user_id=1695796
    Originator: NO

    will added into a inter release.
    with a thanks to Mikey

     
  • pyrou

    pyrou - 2007-10-24
    • status: open --> pending-accepted
     
  • SourceForge Robot

    • status: pending-accepted --> closed-accepted
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • ibrahim

    ibrahim - 2008-03-14
    • status: closed-accepted --> open-accepted
     
  • ibrahim

    ibrahim - 2008-03-14

    Logged In: YES
    user_id=1203985
    Originator: NO

    looks like the patch still didn't make its way into 0.9.6

    this bug is outstanding, ATM.

    ---
    PS
    btw, CP is currently used in the "Movable Type OS" template/style editor.

     

Log in to post a comment.