This is a migrated thread and some comments may be shown as answers.

[Solved] Preview mode target?

3 Answers 108 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 10 Mar 2008, 02:57 PM
How do I get the preview to appear in a separate browser window? In other words, I don't want it to preview in the control, I want it to preview in a new browser window. Thanks -FS

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Mar 2008, 03:54 PM
Hello Frank,

You can implement a custom Print Preview dialog as it is shown in the following live example: Custom Dialogs.
In order to display only the Design and Html modes set the EditModes property like this:

<telerik:RadEditor runat="server" ID="RadEditor1" EditModes="Design,Html"></telerik:RadEditor>

The code and files of the example is available in the RadControls "Prometheus" installation.

All the best,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Frank
Top achievements
Rank 1
answered on 12 Mar 2008, 05:24 PM
Thanks but that's just too many hoops to jump through for what I need to accomplish. Maybe a "target" attribute would be worth looking into for a future release. Thanks.
0
Rumen
Telerik team
answered on 12 Mar 2008, 05:42 PM
Hello Frank,

Could you please explain what do you mean by "target" attribute? If you want to assign a target="_blank" attribute to the links in the content area then you can see the following solution:

<script type="text/javascript">
function onClientLoad (editor)
{
  editor.add_submit(function ()
  {
       var links = editor.get_Document().getElementsByTagName("A");
       for (var i = 0; i < links.length; i++)
       {
           var link = links[i];
           link.setAttribute("target", "_blank");
       }
  }
 );

}
</script>
<telerik:RadEditor OnClientLoad="onClientLoad" ID="RadEditor1" runat="server">
<Content>
Sample Content <a href="http://www.telerik.com">www.telerik.com</a> test <a href="http://www.yahoo.com">www.yahoo.com</a> test <a href="http://www.test.com/some.pdf">some.pdf</a>

</Content>
</telerik:RadEditor>
        <asp:Button ID="Button1" runat="server" Text="Button" />

Let me know if I am missing something and your feature request is other.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Frank
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Frank
Top achievements
Rank 1
Share this question
or