1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / RadEditor Query

RadEditor Query

2 posts, 0 answered
  1. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    18 May 2009
    Link to this post
    Hi,
    When using the RadEditor for example when adding a news story is it possible to have text automatically appear when the admin control loads which will not appear when the news story is published? I want to be able to insert instructions to the people editing the news so they know exactly what text and images should go where when entering a story.
    I thought this would be possible by uploading a template via RadEditor but everything in the template that is uploaded is included in the final published story.

    Thanks

    Simon
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    19 May 2009
    Link to this post
    Hi Simon,

    You can subscribe for the Page_Load and onClick events for the desired template. You need to map the external template and add some logic.

    Here is a sample code:

    <script runat="server"
        //set content to the editor on Page_Load 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if(!Page.IsPostBack) 
            Editor.Content = "Type your content here...."
        } 
         
        // clear the text when you hit save button 
        protected void saveButton1_Click(object sender, EventArgs e) 
        { 
            Editor.Content = Editor.Content.Replace("Type your content here...."""); 
        } 
    </script> 


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered