BlogEngine.NET - Plain Text Post Editor

by nathanrossi 7/2/2008 2:04:00 PM

The TinyMCE BlogEngine.NET Post Editor cant be a pain sometimes, as can all WYSIWYG editors. So if you’re good with HTML or just want to use a plain text then this is how you do it.

I wrote this tutorial because when I wanted to swap out the editor with just a text box I couldn’t find a tutorial.

What is explained here is how to swap the TinyMCE editor with a standard Text Area. First off you need to have BlogEngine installed. Then we look to replace the TinyMCE container with a standard multi line Text Area.

Open up the file “\admin\Pages\Add_entry.aspx” and find the line.

<Blog:TextEditor runat="server" id="txtContent" TabIndex="4" /></p>

<!-- And replace it with -->

<p><!-- Change the Width/Height to what ever suites you -->
<asp:TextBox runat="Server" ID="txtContent" Width="100%" Height="400px" TextMode="multiLine" />
Now to make the Auto Save work you must replace the line
var content = tinyMCE.getContent(&#8216;mce<em>editor</em>0&#8217;);</p>

<p>// With</p>

<p>var content = document.getElementById(&#8216;&lt;%=txtContent.ClientID %>&#8217;).value;
Also remove the Reference to the htmlEditor, cause its not needed anymore
&lt;%@ Register Src=&#8221;../htmlEditor.ascx&#8221; TagPrefix=&#8221;Blog&#8221; TagName=&#8221;TextEditor&#8221; %>

Now when you run it, you might notice that when u press enter in the Text Area it will Post Back, to prevent it posting we must edit the “\admin\Pages\Add_entry.aspx.cs”. Find this line.

if (!Utils.IsMono) Page.Form.DefaultButton = btnSave.UniqueID;</p>

<p>// And comment it out.</p>

<p>//if (!Utils.IsMono) Page.Form.DefaultButton = btnSave.UniqueID;

Save the files, and try out Plain Text Editor. To make it simpler you can just download the files and extract them into the “\admin\Pages\” and replace the existing files.

Download

If you don’t want to use HTML at all, you can try out other formatting extensions like the Markdown Formatter or a BBCode formatter.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

BlogEngine.NET

Related posts

Comments

8/15/2008 12:36:02 AM

hanei

i want to fix the post Editor.
Press Enter to <br> not <p>,how to do?

hanei cn

8/24/2008 8:14:21 AM

nathanrossi

Not sure you would have to look through the TinyMCE code in order to do that. If you are using TinyMCE as the editor.

nathanrossi us

11/27/2008 3:36:17 AM

Busby SEO Test

need more tags can help me please!!

Busby SEO Test us

7/30/2010 7:13:08 PM

email marketing software

Awesome blog design and information. All you can ask for in a website.

email marketing software us

7/30/2010 8:32:32 PM

Jordan 1

This is a really good read for me. Your are one of the best bloggers I ever saw. Thank you for sharing. Welcome to our website. http://www.airjordan.cc/air-jordan-1-1/

Jordan 1 us

7/30/2010 9:41:04 PM

Coach Carly

Hey, For some reason when I put your RSS feed into my RSS aggregator, it's not working. the RSS URL just to make sure I'm using the right one? I appreciate it. Smile

Coach Carly us

7/30/2010 11:28:11 PM

cheap windshield replacement granada hills

I just couldn't leave your website before saying that I really enjoyed the quality information you offer. Will be back often to check up on new stuff you post!

cheap windshield replacement granada hills us

7/31/2010 12:22:25 AM

Learn To Play The Piano

We are a team of volunteers starting a new initiative in our community. Your blog provided us valuable information to work on. You have done a marvelous job!

Learn To Play The Piano us

7/31/2010 12:33:03 AM

Gregory Despain

you just got me a great idea to blog about...

Gregory Despain us

7/31/2010 1:07:08 AM

San Diego Mold Removal

I can't think if any more specific ways to leave a good comment, but I think the overall rule should be to treat online posting like a conversation you'd have in person with your readers. It's sometimes easy to cross these lines inadvertently.

San Diego Mold Removal us

7/31/2010 1:24:34 AM

sexy lingerie

Apple now has Rhapsody as an app, which is a great start, but it is currently hampered by the inability to store locally on your iPod, and has a dismal 64kbps bit rate. If this changes, then it will somewhat negate this advantage for the Zune, but the 10 songs per month will still be a big plus in Zune Pass' favor.

sexy lingerie us

7/31/2010 2:44:00 AM

Jordan 1

First, you should have a healthy diet.
http://www.nikeairjordan.cc/air-jordan--1--i-1/

Jordan 1 tt

7/31/2010 4:56:17 AM

Lane Kieffer

Hi, I can not understand how to add your site in my rss reader. Can you Help me, please Here is my blog:
<A href="www.switchpoweradapter.com/blog">switching power supply manufacturer</A>
<A href="http://www.switchpoweradapter.com">power adapter</A>
<A href="www.switchpoweradapter.com/.../">switching power supply</A>

Lane Kieffer us

7/31/2010 5:01:31 AM

 how to build a website

SEO is the heart for an online empire. It is desired to work with the search engines than work against it!

how to build a website am

7/31/2010 6:00:12 AM

Arturo Oldenburg

I very much enjoy your site and enjoy reading the latest entries but please check the grammar that your writers use.

Arturo Oldenburg us

7/31/2010 7:02:54 AM

Blue Nude Picasso

A considerate mailing, provocative in style, deep . More if you'd be so kind.

Blue Nude Picasso us

7/31/2010 8:10:38 AM

watch television on computer

I have read something about it on another forum but your post is also very informative.

watch television on computer us

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

7/31/2010 10:35:04 AM

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen Modified By Nathan Rossi
© Copyright 2010 Nathan Rossi