Welcome Guest Search | Active Topics | Sign In | Register

Editor ignores preset link target Options
DiscoverSoft
Posted: Wednesday, September 12, 2012 10:54:45 AM
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>
eo_support
Posted: Wednesday, September 12, 2012 11:18:26 AM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.