New Paragraph Tool

2 posts, 1 answers
  1. claudz
    claudz avatar
    39 posts
    Member since:
    Jul 2007

    Posted 11 May 2008 Link to this post

    Hi Telerik Team,

    When clicking on the New Paragraph tool, a new paragraph is inserted, but a space is automatically added in as well.

    i.e. <p> </p> is inserted as opposed to <p></p>

    Is there a way to remove this space when inserting a new paragrah?

    Thanks,
    Claudz
  2. Answer
    Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 12 May 2008 Link to this post

    Hello Claudz,

    To achieve your scenario, you should override the editor's InsertParagraph command and use this one of the browser. You need to put the code below

    RadEditorCommandList["InsertParagraph"] = function(commandName, editor, oTool)
    {     
         editor.SetFocus();
         if(document.all)
         {
            editor.Document.execCommand("InsertParagraph");
         }
         else
         {
            editor.Document.execCommand("InsertParagraph",false, null);
         }
    };

    at the end of the MOSSEditorTools.js file, located at \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\xxxxxxxxxxxxxxx\RadControls\Editor\Scripts\7_x_x\.

    Save the file and restart your browser.

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

Back to Top