Adsense
Popular Posts
- Code update from PHP 7.4 to PHP 8.1 - PhpSpreadsheet
- MySQL workbench -"Could not decrypt password cache"
- Code update from PHP 7.4 to PHP 8.1 - Worksheet/Iterator.php
- Rendering HTML tags inside textarea
- axios handle blob type data
- Unix Utils and wget in Windows
- increase mysql query speed
- Setup vi syntax for PHP
- Get WAMP running on EC2
- add comment to table columns in phpMyAdmin
Monday, June 15, 2015
Rendering HTML tags inside textarea
In textarea
var $mailform = $('<textarea id="textbody"><textarea>');
$mailform.find('#textbody').html("Dear <br />, This is advised that...");
We found html tags br is not rendered.
To sovle this problem, we make a div editable
var $mailform = $('<div id="textbody" class="editable"><div>');
$mailform.find('#textbody').html("Dear <br />, This is advised that...");
$('.editable').each(function(){
this.contentEditable = true;
});
Now this div has same feature as textarea.
Labels:
textarea
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment