Welcome Guest Search | Active Topics | Sign In | Register

Editor control - Enter key :-s Options
apple
Posted: Thursday, November 27, 2008 7:57:59 AM
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>
eo_support
Posted: Thursday, November 27, 2008 8:23:30 AM
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
apple
Posted: Thursday, November 27, 2008 8:55:35 AM
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



eo_support
Posted: Thursday, November 27, 2008 9:03:19 AM
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!
apple
Posted: Thursday, November 27, 2008 2:23:36 PM
Rank: Newbie
Groups: Member

Joined: 11/26/2008
Posts: 6
It also perfactly works in my app. as you varified; TextAreaCssFile="~/StyleSheetEditor.css"
Thanks
eo_support
Posted: Thursday, November 27, 2008 5:22:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Great. Thanks for letting us know!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.