ExtJs textarea multiline issue

How can I assign text containing \r\n to an ExtJs textarea and get to see line breaks instead of the actual \r\n characters? When I manually press the Enter key and check Firebug, I can see \r\n getting inserted. But if I assign a string containing \r\n to the textarea, it renders as-is.

Any hints would be helpful.


I solved it myself. I was using the 'html' property to assign the \r\n-riddled text to the textarea. I changed that to 'value', and it works like a charm. Thanks anyway.


var text = text.replace('\r\n',"" + String.fromCharCode(13) + String.fromCharCode(10));

Category:extjs Time:2010-06-15 Views:3
Tags: textarea extjs

Related post

  • ExtJs Cascading-Combos Issue 2009-04-30

    I Have an issue (maybe it will be my mistake using incorrectly ExtJs, I hope I do) using ExtJs to do a cascading-combos in a form. This is the situation: I have 3 combos, Zones, Regions, Cities When I click on one of them in order, the related one wi

  • ExtJs IE rendering issue 2009-06-29

    Below is a simple ext js code that i can't get to work correctly in IE (works fine in Firefox, and Chrome). The problem is that while it initially renders correctly , its messed up if i try resizing the 'west' panel. Can someone please point out the

  • jQuery UI Dialog and Textarea Focus Issue 2010-01-27

    I'm working on a modal comment system using jQuery and jQuery UI, but I'm having some issues with focus. I have a series of divs inside the modal to switch between Login and Add comment, as below: <div id="modal" title="Loading"> <div id="mo

  • ExtJS 4 - ComboBox Issue 2011-09-08

    I've got an issue when using an extjs combo box (regardless of browser, tested in Chrome and FF with same result). The combo box loads just fine, both entries are displayed. I can select one of the two that are loaded initially, but if I try and chan

  • Data is not pulling from mysql db into php app - textarea field issue - maybe? 2012-03-20

    Think I need to come at this from another angle now - I have an issue that I originally blamed on tinyMCE [and part of it was related to tinyMCE], but now after much research, I 'think' this new issues has something to do with Textarea field limits,

  • Sending php data to textarea - encoding issue 2012-04-17

    I've using two textareas and a button. The idea is when the button is pressed all the information on textarea1 will be send to the php function reverse them and then return the result on textarea2 (I am using ajax as well so I don't have to reload th

  • Possible to have Bold text in EXTJS Textarea? 2013-06-27

    Wondering if I can bold text, and possibly have icons. I am on v3.2.1 of EXTJS. Thank you for your assistance in this matter. --------------Solutions------------- add a css class as <style type="text/css"> .bc-tenant textarea { font-weight: bol

  • MVC Html.TextArea overload issue 2009-06-05

    I have a form in an MVC view which contains a number of text boxes, drop down lists and text areas. I am using the HTML helper to create these controls, including pre-populating them with View Data where appropriate, and applying styles via the htmlA

  • extjs combo queryParam issue 2011-07-07

    I have a combo in extjs which is looking for usernames based on what the user types. The server backend is matching for whatever comes via get in the format $_GET['username']. My combo queryParam is called username. When I start typing, the username=

  • jQuery AJAX JSON - textarea characters issue 2011-10-15

    I have a code for a comment system. jQuery: function sendComment() { $('#comment_write_area').fadeOut(1); $('#ajax-json-response').fadeOut('fast').html(''); $('#ajax-loading').html('<img src="images/ajax-loader.gif" />').fadeIn('slow'); var com

  • EXTJS Grid rendering issue 2011-11-17

    I am new to ExtJs and I am using ExtJs grid to show data in tabular format. I am having following <div> structure - <div id="div1" style="height:98%;padding:2px;display:none;"> <div id="grid_id"> </div> </div> The div1 c

  • ExtJs textarea with formatting 2012-02-08

    I'm trying to add formatted json string to my textarea field. But it doesn't work. I'm formatting string using this approach: How can I beautify JSON programmatically? and then just call textarea.setValue(formattedJson); Check the snapshot of result:

  • ExtJs window sliding issue 2012-03-17

    I have got an extJs Windows rendered to Ext.getBody(). The page where it's rendered has a quick link option (custom fancy button) that when clicked shows another div. What i want to do is that if the quick links are not shown the extJs window should

  • date format with extjs 4.1 issue 2012-04-27

    In my model (Ext.data.Model) i have the following property { mapping:'Created', name:'Created', type: 'date', format:'d/m/Y' }, On my form i have the following field { xtype:'datefield', name:'Created', fieldLabel:' Date', format:'d/m/Y', width: 350

  • Java Regex Multiline issue 2015-03-17

    I have a String read from a file via apache commons FileUtils.readFileToString, which has the following format: <!--LOGHEADER[START]/--> <!--HELP[Manual modification of the header may cause parsing problem!]/--> <!--LOGGINGVERSION[2.0.

  • ExtJs Fieldset Collapsed issue 2011-04-11

    I have a fieldset with the option checkboxToggle:true. When the user checks/unchecks the checkbox, I don't want the fieldset to expand/collapse. How can I accomplish this? Thanks in Advance --------------Solutions------------- You can implement the b

  • Extjs-panel afterlayout issue 2011-05-03

    hi i have a panel im doing some action on panel afterlayout but im facing a problem in panel afterlayout it seems to fire when its not suppose to..like when a broser goes out of focus..why does it happen is there a way to stop it..

  • Extjs panel resize issue 2011-06-25

    My page uses border layout with center and east regions, center region has three panels as children, two of the panel are collapsible. When I collapse east region, center regions child panels are not resized. Ext.require(['*']); Ext.onReady(function(

  • UITextView Interface Builder MultiLine Issue 2012-01-15

    I am using a UITextView in Interface Builder and have typed a hunk of text into it and there are lots of lines breaks in it, blank lines. I did this by typing into it and alt-returning to get a new line. However when built and run on my device none o

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.561 (s). 13 q(s)