Hi all,
I am new to FCK Editor,my problem is ,i want to set the img tag 'src' attibute dynamically, it was replacing but, it is not appended to the FCK content, i am using below code for replacing ,below idea sujested by one of my friend
var oEditor = FCKeditorAPI.__Instances['DocumentsFCKeditor'];
$( oEditor.EditorDocument.body ).find('img[@class="mergeField"]').each(function()
{
strTemplateId = $(this).attr('id');
strTemplate = '[' + strTemplateId.slice(22) + ']';
$(this).attr('alt', strTemplate );
console.log($(this).attr('alt'));
strSrc = "/SSHD/common/gd.php?strContent=" + strTemplate + "&TextType=MergeField";
this.src = strSrc;
this._fcksavedurl = strSrc;
console.log( this.src );
console.log( this._fcksavedurl );
});
the fck content was not modified ,it is given old fck content only
If any one know ,please tell
Thanks and Regards
swamy
I am new to FCK Editor,my problem is ,i want to set the img tag 'src' attibute dynamically, it was replacing but, it is not appended to the FCK content, i am using below code for replacing ,below idea sujested by one of my friend
var oEditor = FCKeditorAPI.__Instances['DocumentsFCKeditor'];
$( oEditor.EditorDocument.body ).find('img[@class="mergeField"]').each(function()
{
strTemplateId = $(this).attr('id');
strTemplate = '[' + strTemplateId.slice(22) + ']';
$(this).attr('alt', strTemplate );
console.log($(this).attr('alt'));
strSrc = "/SSHD/common/gd.php?strContent=" + strTemplate + "&TextType=MergeField";
this.src = strSrc;
this._fcksavedurl = strSrc;
console.log( this.src );
console.log( this._fcksavedurl );
});
the fck content was not modified ,it is given old fck content only
If any one know ,please tell
Thanks and Regards
swamy