Javascript injection problem #1397
Replies: 2 comments 1 reply
-
you need to use Trumbowyg's API to get the content of the enhanced textarea and then append your new content to it `function pad(num, size) { function settvref() { // Get the current content of the Trumbowyg-enhanced textarea // Append your new content to the current content // Set the updated content back into the Trumbowyg-enhanced textarea |
Beta Was this translation helpful? Give feedback.
-
Working a treat¿, Thank you |
Beta Was this translation helpful? Give feedback.
-
I currenly have the following JS code to insert text into a <textarea> however when I use Trumbowyg to enhance the textarea this function stops working, How would I change the existing code to work with Trumbowyg?
`
function pad(num, size) {
var s = "0" + num;
return s.substr(s.length-size);
}
}
`
Beta Was this translation helpful? Give feedback.
All reactions