Hi Telerik Team,
I have an issue with radeditor while Printing i.e When you enter text until radeditor has got some scroll bars and if you print that, all text is not getting printed.i have attached a sample PrintOut. Can u Please help me out in this issue.
Thanks,
vijay.
I have an issue with radeditor while Printing i.e When you enter text until radeditor has got some scroll bars and if you print that, all text is not getting printed.i have attached a sample PrintOut. Can u Please help me out in this issue.
Thanks,
vijay.
8 Answers, 1 is accepted
0
Hi Vijay,
You should use the Print button of RadEditor to print the editor's content but not the Print button of the browser.
See the attached video for more information: http://screencast.com/t/DHERogyd.
Best wishes,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You should use the Print button of RadEditor to print the editor's content but not the Print button of the browser.
See the attached video for more information: http://screencast.com/t/DHERogyd.
Best wishes,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Vijay
Top achievements
Rank 2
answered on 13 Sep 2011, 11:17 AM
Hi Rumen,
Thanks For the Reply.
i cant use that print button given in radeditor as radeditor is a part of my webpage which has many other controls and i've got seperate link in the web page to get it Printed.
Thanks,
Vijay.
Thanks For the Reply.
i cant use that print button given in radeditor as radeditor is a part of my webpage which has many other controls and i've got seperate link in the web page to get it Printed.
Thanks,
Vijay.
0
Hi Vijay,
The browser cannot print the hidden content inside the editable iframes, divs, textareas as the content area of RadEditor.
In your case I suggest setting the AutoResizeHeight property to true in all RadEditors on the page so that their contents become visible on the page and can be printed.
Greetings,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The browser cannot print the hidden content inside the editable iframes, divs, textareas as the content area of RadEditor.
In your case I suggest setting the AutoResizeHeight property to true in all RadEditors on the page so that their contents become visible on the page and can be printed.
Greetings,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Vijay
Top achievements
Rank 2
answered on 13 Sep 2011, 11:34 AM
Thanks For the Quick Response Rumen,
As u Said i could set autoresize property to true but as per the client requirements i have to show radeditor on web page with some fixed height with out changing .
Can we set this autoresize property through javascript only while the time of printing and set back to original after the print command completes?
Thanks,
vijay.
As u Said i could set autoresize property to true but as per the client requirements i have to show radeditor on web page with some fixed height with out changing .
Can we set this autoresize property through javascript only while the time of printing and set back to original after the print command completes?
Thanks,
vijay.
0
Hello Vijay,
The AutoResizeHeight property can be set on the server only.
The other possible approach is to get the editors contents on the client using editor.get_html(true), set it in a hidden iframe element on the page and print the content of the iframe element. If you unable to implement your scenario with RadEditor implement it with textarea elements. After that send us the code and we will replace the textareas with RadEditor controls and send you the updated code.
You can see how to print the content of multiple editors in this help article: Printing Content with Styles. You should create an iframe element and in the printDocument.write method to add the content of all editors.
Kind regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The AutoResizeHeight property can be set on the server only.
The other possible approach is to get the editors contents on the client using editor.get_html(true), set it in a hidden iframe element on the page and print the content of the iframe element. If you unable to implement your scenario with RadEditor implement it with textarea elements. After that send us the code and we will replace the textareas with RadEditor controls and send you the updated code.
You can see how to print the content of multiple editors in this help article: Printing Content with Styles. You should create an iframe element and in the printDocument.write method to add the content of all editors.
Kind regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Waseem
Top achievements
Rank 1
answered on 29 Mar 2013, 05:09 PM
Hi Rumen
When i try to print radeditor using javascript. it is not printing radeditor according to my desired. i also attach image when i click on print link. Can you please check this?
<script language="javascript" type="text/javascript">
function PrintableDiv() {
var radGrid = document.getElementById('tblPrint').innerHTML;
var previewWnd = window.open('about:blank', '', '', false);
var styleStr = "<html><head> <meta http-equiv='X-UA-Compatible' content='IE=8' /><title>Test Sample</title>";
styleStr += "<style type='text/css'>.html{ padding: 0; margin: 0; height: 100%; } .body { padding: 0; margin: 0; height: 100%; } .form { padding: 0; margin: 0; height: 100%; }";
styleStr += "</style></head>";
var htmlcontent = styleStr + "<body>" + radGrid + "</body></html>";
previewWnd.document.open();
previewWnd.document.write(htmlcontent);
previewWnd.document.close();
previewWnd.print();
previewWnd.close();
}
</script>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
<div id="tblPrint" name="tblPrint">
<telerik:RadEditor ID="radEditor" runat="server" ToolbarMode="Default" BorderStyle="None" EditModes="Design" BorderWidth="0" BorderColor="Transparent" ExternalDialogsPath="~/EditorDialogs" runat="server" Height="190" Width="100%">
<CssFiles>
<telerik:EditorCssFile Value="~\hris/css/FAQRadEditor.css" />
</CssFiles>
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
<telerik:EditorTool Name="ForeColor" />
<telerik:EditorTool Name="InsertSymbol" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="InsertUnorderedList" />
<telerik:EditorTool Name="InsertOrderedList" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Outdent" />
<telerik:EditorTool Name="Indent" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="JustifyLeft" />
<telerik:EditorTool Name="JustifyCenter" />
<telerik:EditorTool Name="JustifyRight" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="LinkManager"/>
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorToolStrip Name="InsertTable" />
</telerik:EditorToolGroup>
</Tools>
<Content>
</Content>
</telerik:RadEditor>
</div>
<a href="#" onclick="PrintableDiv()">Printable div</a>
Thanks,
Muhammad Waseem
the Telerik team
When i try to print radeditor using javascript. it is not printing radeditor according to my desired. i also attach image when i click on print link. Can you please check this?
<script language="javascript" type="text/javascript">
function PrintableDiv() {
var radGrid = document.getElementById('tblPrint').innerHTML;
var previewWnd = window.open('about:blank', '', '', false);
var styleStr = "<html><head> <meta http-equiv='X-UA-Compatible' content='IE=8' /><title>Test Sample</title>";
styleStr += "<style type='text/css'>.html{ padding: 0; margin: 0; height: 100%; } .body { padding: 0; margin: 0; height: 100%; } .form { padding: 0; margin: 0; height: 100%; }";
styleStr += "</style></head>";
var htmlcontent = styleStr + "<body>" + radGrid + "</body></html>";
previewWnd.document.open();
previewWnd.document.write(htmlcontent);
previewWnd.document.close();
previewWnd.print();
previewWnd.close();
}
</script>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
<div id="tblPrint" name="tblPrint">
<telerik:RadEditor ID="radEditor" runat="server" ToolbarMode="Default" BorderStyle="None" EditModes="Design" BorderWidth="0" BorderColor="Transparent" ExternalDialogsPath="~/EditorDialogs" runat="server" Height="190" Width="100%">
<CssFiles>
<telerik:EditorCssFile Value="~\hris/css/FAQRadEditor.css" />
</CssFiles>
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
<telerik:EditorTool Name="ForeColor" />
<telerik:EditorTool Name="InsertSymbol" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="InsertUnorderedList" />
<telerik:EditorTool Name="InsertOrderedList" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Outdent" />
<telerik:EditorTool Name="Indent" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="JustifyLeft" />
<telerik:EditorTool Name="JustifyCenter" />
<telerik:EditorTool Name="JustifyRight" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="LinkManager"/>
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorToolStrip Name="InsertTable" />
</telerik:EditorToolGroup>
</Tools>
<Content>
</Content>
</telerik:RadEditor>
</div>
<a href="#" onclick="PrintableDiv()">Printable div</a>
Thanks,
Muhammad Waseem
the Telerik team
0
Elham
Top achievements
Rank 1
answered on 07 Aug 2017, 05:56 AM
Hi
i have this problem now
are u fix it ??
0
Elham
Top achievements
Rank 1
answered on 07 Aug 2017, 05:56 AM
Hi
i have this problen in pro=int of rad editor content like this
are u fix it??/