Showing posts with label telerik. Show all posts
Showing posts with label telerik. Show all posts

Monday, December 29, 2014

telerik RadEditor Remove unwanted tool buttons from Radeditor

We can remove unwanter buttons from telerik RadEditor using following code. We just need to specify all the buttons which we need in an editor and their order.


<telerik:RadEditor runat="server" ID="EditorImageUrl">
  <ImageManager ViewPaths="~/G/L,~/G/C" UploadPaths="~/G/L" DeletePaths="~/G/L" />
  <Tools>
            <telerik:EditorToolGroup Tag="MainToolbar">
                <telerik:EditorTool Name="FindAndReplace" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="Undo" />
                <telerik:EditorTool Name="Redo" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="Cut" />
                <telerik:EditorTool Name="Copy" />
                <telerik:EditorTool Name="Paste" ShortCut="CTRL+!" />
                <telerik:EditorTool Name="Bold" />
                <telerik:EditorTool Name="Italic" />
                <telerik:EditorTool Name="Underline" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="ForeColor" />
                <telerik:EditorTool Name="BackColor" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="FontName" />
                <telerik:EditorTool Name="RealFontSize" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="ImageManager" />
            </telerik:EditorToolGroup>
  </Tools>

</telerik:RadEditor>

telerik RadEditor ImageManager: Display complete url of image instead of relative url.

ImageManager in Telerik RadEditor adds images to the editor but with related url. which could raise some issues with url rewriting. we can easily resolve this by using ContentFilters attribute. image manager in following editor will add images with complete url only.



<telerik:RadEditor runat="server" ID="EditorImageUrl" ContentFilters="DefaultFilters,MakeUrlsAbsolute">
  <ImageManager DeletePaths="~/DisplayImages" UploadPaths="~/DisplayImages" ViewPaths="~/DisplayImages" />

</telerik:RadEditor>

Telerik Radeditor: ImageManager - display images from multiple folder.

use following code to include ImageManager to a RadEditor and display images from multiple folders:

<telerik:RadEditor ID="RadEditor1" Height="600" runat="server">
  <ImageManager ViewPaths="~/Images/ProfilePics,~/Images/PublicPics" UploadPaths="~/Images/ProfilePics" DeletePaths="~/Images/ProfilePics" />
</telerik:RadEditor>