Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2011
    Posts
    52
    Answers
    1
    Vote Rating
    0
    davidryan is on a distinguished road

      0  

    Default Unanswered: HtmlEditor replace <br> with <br/>

    Unanswered: HtmlEditor replace <br> with <br/>


    When a newline is created in the HtmlEditor field, it is done by wrapping a <br> inside a div block. Due to a backend component requirement, I need to ensure the <br> is closed (i.e. insert <br/> instead). Unfortunately I can't post-process the field on the server to achieve this.

    Is there any way I can override the HtmlEditor field's behaviour to insert a <br/> instead of a <br>? Is this even something that HtmlEditor does? Perhaps it's default browser behaviour ... if so, how would I go about handling that? Check for the browser type and capture <enter> events, ... then? :-)

    Thanks in advance!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    We actually don't control the line breaks (unless it's IE). The html that is inserted into the textarea actually comes from a body.innerHTML call which comes directly from the browser. You can see this in the syncValue method of the HtmlEditor.

    To do this yourself, you can override the cleanHtml method and return the new html so you can replace <br> with <br />
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread