Page 5 of 5 FirstFirst ... 345
Results 41 to 46 of 46

Thread: [FIXED-87] [3.0RC3] HTMLEditor prepends ? to message

    You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #41
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Works pretty well...
    Code:
    Ext.override(Ext.form.HtmlEditor, {
        defaultValue: '<!-- Will be removed by the editor -->',
        cleanDefaultValue: true,
        cleanHtml: function(html) {
            html = String(html);
            if(Ext.isWebKit){
                html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
            }
            if(this.cleanDefaultValue){
                html = html.replace(new RegExp(this.defaultValue), '');
            }
            return html;
        }
    });

  2. #42
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    The only issue I can see is if maybe the user can somehow get the cursor inside the comment.

  3. #43
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    I don't think that's possible.

    But I haven't tested older browsers like IE6 yet...

  4. #44
    Sencha User
    Join Date
    Mar 2012
    Posts
    1

    Question

    HI,

    How about the solution on extjs 4?
    I looked at the code and it seems pretty similar to that who causes the bug on version 3.

  5. #45
    Sencha User
    Join Date
    Aug 2007
    Location
    India
    Posts
    10

    Default

    Quote Originally Posted by Condor View Post
    Works pretty well...
    Code:
    Ext.override(Ext.form.HtmlEditor, {
        defaultValue: '<!-- Will be removed by the editor -->',
        cleanDefaultValue: true,
        cleanHtml: function(html) {
            html = String(html);
            if(Ext.isWebKit){
                html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
            }
            if(this.cleanDefaultValue){
                html = html.replace(new RegExp(this.defaultValue), '');
            }
            return html;
        }
    });
    Thanks Condor, It works for me.

  6. #46
    Sencha Premium User
    Join Date
    May 2017
    Location
    Lafayette, CO
    Posts
    40

    Default

    I'm confused about this bug... has it supposedly been fixed? I recently ran into a similar issue in 6.5.1, where all of Firefox's saves included a question mark at the end, and Condor's fix does solve the problem. It also solves the problem of changing the font color in Chrome (which prepended the question mark). So I'm not sure why this says it was fixed in ticket 87, unless the issue has creeped back in.

Page 5 of 5 FirstFirst ... 345

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •