开发者

Insert variable in Spaw Editor

开发者 https://www.devze.com 2023-03-16 00:47 出处:网络
$sw = newSPAW_Wysiwyg(\'txtContent\' , stripslashes($descHTML) ,\'en\' ,\'intlink\' , \'default\' ,\'400px\' ,\'200px\' ,\'\',$spaw_dropdown_data);
$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">&#8249;</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.

0

精彩评论

暂无评论...
验证码 换一张
取 消