Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
Could you please tell me what's wrong with this code? I'm trying to preset and hide the link's target as _blank, but the editor just ignores it. It does not include the target in the link's definition at all. Thanks.
Code: HTML/ASPX
<DialogContents>
<eo:EditorDialogContent CommandName="InsertOrEditLink">
<ContentTemplate>
<p>Enter Url:</p>
<input name="eo_editor_insertlink_url" style="width:400px;">
<p>Link Text:</p>
<input name="eo_editor_insertlink_text" style="width:400px;">
<input name="eo_editor_insertlink_target" style="display:none" value="_blank">
<p style="text-align:center">
<input type="button" value="OK" name="eo_editor_default_button"
onclick="eo_GetContainer(this, 'Editor').execDialogCommand('InsertOrEditLink', this);" >
</p>
</ContentTemplate>
</eo:EditorDialogContent>
</DialogContents>
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will have to set eo_editor_insertlink_target's value inside onclick before calling execDialogCommand. The reason is the dialog will try to "load" the initial data in case it's editing an existing link, in that case eo_editor_insert_link_target will load the existing link's target value. In case a new link, it will be initialized to empty. So whatever value you set must be set AFTER that.
Thanks!
|