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

New Paragraph Tool

1 Answer 67 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
claudz
Top achievements
Rank 1
claudz asked on 12 May 2008, 01:53 AM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 12 May 2008, 08:59 AM
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
Tags
WebParts for SharePoint
Asked by
claudz
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or