[Solved] Textarea indent 4 spaces jQuery & Codeigniter |
Hi,
I have not tested it, but is should work. What you need to do is to find the newline and add your startTag to each line. Because of different character for new line on Windows, Linux and Mac you need to test for all 3. You will notice I use the \r\n (Windows linebreak) to insure it works on most systems PHP Code: function wrapText(elementID, openTag, closeTag) { Source 1 for the solution Source 2 A good decision is based on knowledge and not on numbers. - Plato
|
Messages In This Thread |
[Solved] Textarea indent 4 spaces jQuery & Codeigniter - by wolfgang1983 - 12-20-2016, 08:02 PM
RE: Textarea indent 4 spaces jQuery & Codeigniter - by salain - 12-21-2016, 12:20 AM
RE: Textarea indent 4 spaces jQuery & Codeigniter - by wolfgang1983 - 12-21-2016, 12:33 AM
RE: Textarea indent 4 spaces jQuery & Codeigniter - by salain - 12-21-2016, 01:17 AM
RE: Textarea indent 4 spaces jQuery & Codeigniter - by wolfgang1983 - 12-21-2016, 01:55 AM
|