$sw = new SPAW_Wysiwyg('txtContent' , stripslashes($descHTML) ,'en' ,'intlink' , 'default' ,'400px' ,'200px' ,'',$spaw_dropdown_data);
$sw->show();
and when i am trying to include a variable from outside using javascript like this way -
<b style="color:#CC3300">‹</b>
<a href="javascript:insertVar(document.frmNewsLetter['txtContent'],'[FIRSTNAME]');">First Name</a>
using this way i can insert into textarea but开发者_JAVA百科 not in spaw
You need to reference the Spaw objects in Javascript rather than directly modifying its DOM elements.
There should be a global Javascript object named txtContent_obj
(or something similar to that -- check exactly what you've got with Firebug), which you should be able to manipulate to update the Spaw editor's contents correctly.
You should be able do something along these lines:
window.txtContent_obj.current_context.innerHTML = "Lets give this a try";
Hope that helps.
精彩评论