RadEditor - Hanging Indent needed

4 posts, 0 answers
  1. Matt Kelliher
    Matt  Kelliher avatar
    2 posts
    Member since:
    Oct 2009

    Posted 20 Jul 2011 Link to this post

    Working in Higher Education, we regularly have users requesting that they be able to using hanging indents for their bibliographies. Is there a hanging indent button in RadEditor? Something that would render something like: style="margin: 0in 0in 0pt 0.5in; text-indent: -0.5in;" ?
  2. Rumen
    Admin
    Rumen avatar
    14469 posts

    Posted 20 Jul 2011 Link to this post

    Hi Matt,

    The following forum thread will show you how to overwrite the default Indent command of RadEditor and customize it: http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-indent-to-use-padded-div-instead-of-blockquote.aspx

    If you would like you can implement as another approach a new custom Indent button. This demo shows how to build custom buttons: http://demos.telerik.com/aspnet-ajax/editor/examples/customtools/defaultcs.aspx

    All the best,
    Rumen
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. Matt Kelliher
    Matt  Kelliher avatar
    2 posts
    Member since:
    Oct 2009

    Posted 05 Dec 2011 Link to this post

    I followed the demo (http://demos.telerik.com/aspnet-ajax/editor/examples/customtools/defaultcs.aspx) to implement as a new custom Indent button, however, when I set the RadEditor enabled='false' for read-only viewing; I get a runtime "Microsoft JScript runtime error: 'Telerik' is undefined... presumably because the RadEditor control has been rendered as a <div> tag now. How do I get my custom button Javascript code to dynamically execute or not execute based on the presence of the RadEditor?
  4. Rumen
    Admin
    Rumen avatar
    14469 posts

    Posted 06 Dec 2011 Link to this post

    Hello Matt,

    You should wrap the JavaScript command of the custom button in:


    if(typeof($telerik) != "undefined") {
       //put the command declaration here
    }

    or

    if(typeof(RadEditorCommandList) != "undefined") {
                Telerik.Web.UI.Editor.CommandList["CustomButton"] = function(commandName, editor, args)
                {   
                };
    }


    Greetings,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top