I’m using jwysiwyg on multiple textarea’s on one page. However my textarea’s have initial pre-filled values which I need it to use. Instead jwysiwyg’s default ‘Initial content’ is used.
my code is:
$(document).ready(function(){
$('textarea').wysiwyg({
autoGrow:true,
initialContent: this.value,
controls:"bold,italic,underline,|,undo,redo"
});
});
Appreciate I could call each textarea individually by id but that seems like lines of code for the sake of it. Think my issue is all down to the way I’m referncing ‘this.value’ but cant figure it out.
I can solve this by changin the following in jswysywig.js
‘initialContent = original.val();’
change to
‘options.initialContent = original.val();’
Is this what you are looking for: http://jsfiddle.net/QjBh4/
Hope this fits your need
:))P.S. – Please feel free to use my demo and create your issue, I will defo try and help you out, if I missed anything!
Script source et. al.
Sample code