|
Rank: Newbie Groups: Member
Joined: 11/26/2008 Posts: 6
|
"Enter key" in the Design mode inputs two lines, not the next line. I have found a reason from "HTML" mode as;
<p><b>One of the Somali pirates responsible for hijacking </b></p>
How to block the insertion of "<p> </p> as pressing "Enter Key"? I like "Enter Key" to input <b></b> only, instead of <p><b> </b></p>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, <b> is bold, so it has nothing to do with enter key. Bold can be turned on or off from the toolbar. The editor always generates <p> for enter key. The reason that it appears to be two lines is actually not because it added two lines. It's because the default space between two paragraphs are too big. You can try to reduce that space with some very easy CSS settings:
Code: CSS
p { margin-top:0px; margin-bottom:0px; }
Put this into a separate CSS file (for example, test.css), then set the Editor's TextAreaCssFile to point to this file. Note the property takes relative path. So for example, if test.css is on the root directory of your web application, you should set TextAreaCssFile to "~/test.css". Hope this helps. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 11/26/2008 Posts: 6
|
tried with the CSS p { margin-top:0px; margin-bottom:0px; }, but failed
It would be good if there are an options as "Enter key" pressed such as:
Editor1.BreakMode = BreakMode.LineBreak or Editor1.BreakMode = BreakMode.Paragraph
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
apple wrote:tried with the CSS p { margin-top:0px; margin-bottom:0px; }, but failed We verified this and it works. The key is that you need to put this in a separate CSS file and then give that file to the Editor through its TextAreaCssFile property. Putting this in your main CSS file will not work. Please post a test page if it does not work for you. apple wrote:It would be good if there are an options as "Enter key" pressed such as: Editor1.BreakMode = BreakMode.LineBreak or Editor1.BreakMode = BreakMode.Paragraph This is something different that we do not have yet. We will see if we can support that in our future release. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/26/2008 Posts: 6
|
It also perfactly works in my app. as you varified; TextAreaCssFile="~/StyleSheetEditor.css" Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Great. Thanks for letting us know!
|
|