1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
    alexpaiu is on a distinguished road

      0  

    Default Unanswered: Htmleditor incorect source html

    Unanswered: Htmleditor incorect source html


    Hello,

    I have some problems with the htmleditor. I'm using it for loading a XML file, modifying some text in it, and then save it.
    I'm trying for over 3 days to find a solution, but in vain.

    The problems are:
    1) The <img src="" /> it's modified in <img src="" > (without the /)
    2) Same for the br
    3) attributes like "aplicationPath" are modified to "aplicationpath", with lower p

    When I save the edited XML, it will be stored with this problems. Is there a way to load the XML file, without being modified?

    Even if I copy paste the XML in the 'source edit', it's instantly modified, with the upper problems. And the source edit is unique for every browser.

    Thank you very much,
    Have a good day

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Answers
    675
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You could look at perhaps overriding the cleanHtml function and see if this help.

    Scott.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
    alexpaiu is on a distinguished road

      0  

    Default


    Thank you for your answer Scott. I tried overriding the cleanHtml function :

    Ext.override(Ext.form.field.HtmlEditor, {
    cleanHtml: function(html) {


    return html;
    }
    }) ;

    It overrides the cleanHtml, but the result it's not the expected one . The html it's still instantly modified. And still the source code is unique for every browser. Perhaps i need to override another method ?

    Thanks

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Answers
    675
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Perhaps have a look at

    Code:
    fieldSubTpl [ ..]
    It calls: Ext.util.Format.htmlEncode(values.value),

    Scott.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
    alexpaiu is on a distinguished road

      0  

    Default


    I've attached an use case to better explain my Issue

    Step 1: In "Source edit mode insert this piece of xml". Remember how swfFile is written and alternativePath

    Step1.png

    Step 2 : Toggle to Standard edit mode

    Step 3 : Toggle back to "Source edit mode, and see the differences. Bot "swfFile" and "alternativePath" are lower case now.
    Step 3.png

    Hope this will help,

    Thanks

Thread Participants: 1

Tags for this Thread