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

print content of radeditor

0 Answers 129 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Elham
Top achievements
Rank 1
Elham asked on 07 Aug 2017, 06:15 AM

Hi

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>

 function CallPrint(strid) {
        var prtContent = document.getElementById(strid);
        var WinPrint = window.open('', '', 'letf=0,top=0,width=800,height=700,toolbar=0,scrollbars=0,status=0,dir=ltr');
        WinPrint.document.write(prtContent.innerHTML);
        WinPrint.document.close();
        WinPrint.focus();
        WinPrint.print();
        WinPrint.close();
        prtContent.innerHTML = strOldOne;
    }

 

</script>

 

 <div runat="server" id="dv_editor" >  <asp:Button CssClass="btn btn-primary" Visible="true"  ID="uxPrint" runat="server" Text="چاپ"  onclientclick="javascript:CallPrint('dv_editor');" />

    <telerik:RadEditor ID="uxHtmlEditor" runat="server"  Height="570px" width="750px" AutoResizeHeight="true"  ClientIDMode="Static"
        EditModes="Preview" Skin="Silk" AllowScripts="true" OnClientModeChange="OnClientModeChange" ContentFilters="DefaultFilters,PdfExportFilter"
        ContentAreaCssFile="~/UserControl/Admin/Css/EditorContentArea_RTL.css"  Language="es-ES"
          DialogsCssFile="~/UserControl/Admin/Css/RadEditor_Dialogs_RTL.css"
        >
        <ExportSettings OpenInNewWindow="false">
             <Docx DefaultFontName="Arial" DefaultFontSizeInPoints="12" HeaderFontSizeInPoints="8" PageHeader="Some header text for DOCX documents" />
                </ExportSettings>
        <Modules>
                    <telerik:EditorModule Name="RadEditorHtmlInspector" Enabled="false" />
                    <telerik:EditorModule Name="RadEditorNodeInspector" Enabled="false" />
                    <telerik:EditorModule Name="RadEditorDomInspector" Enabled="false" />
                    <telerik:EditorModule Name="RadEditorStatistics" Enabled="false" />
                </Modules>

    </telerik:RadEditor>

 

</div>

 <asp:Button CssClass="btn btn-primary" Visible="true"  ID="uxPrint" runat="server" Text="چاپ"  onclientclick="javascript:CallPrint('dv_editor');" />

 

No answers yet. Maybe you can help?

Tags
Editor
Asked by
Elham
Top achievements
Rank 1
Share this question
or