Click here to Skip to main content
12,697,076 members (26,498 online)
Click here to Skip to main content
Add your own
alternative version

Stats

24.8K views
9 bookmarked
Posted

TinyMCE for ASP.NET

, 19 Jan 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Fast, easy with/without local js, allow ins HTML code by saving

Introduction

TinyMCE 4.x add to ASP.net has some different code, unlike the samples on the site will tell you.

I let you explore some easy and fast working tips by showing an example.

Using the Code

Download from http://www.tinymce.com/download/download.php or cloud link on the same page (and in the code).

Place the code below in the Head tag under the Title tag:

 <%-- reference site http://www.tinymce.com/wiki.php --%>
    <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>

If you'll use the downloaded .js script locally, replace the tag on the ↑second line↑.

Place ↓this inside the form tag:

<asp:TextBox ID="tbxTinymce" CssClass="mcetiny" runat="server"></asp:TextBox>

Info: Connection between the javascriptcode and textbox is the common CssClass name (mcetiny).

Extra info: plugins are the menu Tabs, toolbar are the button bars.

Ready.... or do you want to save HTML/XML code.

Additional

Saving HTML/XML, etc. code.

This requests some extra work, but is also easy...
To get rid of the error:
(A potentially dangerous Request.Form value was detected from the client)

In web.config into section system.web place:

<httpRuntime requestValidationMode="2.0" />

At the top of the page into the page tag, add:

validateRequest="false"

Now you are ready to enjoy.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

4Dinand2
Software Developer
Netherlands Netherlands
20 years IT, Sinds 2010 development.
C#, asp.net, MVC, html, css, VB.net, SQL, javascript, jquery, xml, linq.

You may also be interested in...

Pro
Pro

Comments and Discussions

 
GeneralAwesome Work Pin
harisivan026-Mar-15 21:35
memberharisivan026-Mar-15 21:35 
GeneralAWESOME SOLUTION Pin
Athar Anis11-Jan-15 7:12
memberAthar Anis11-Jan-15 7:12 
Questionquestion about tinymce Pin
Member 108164541-Aug-14 12:27
memberMember 108164541-Aug-14 12:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 19 Jan 2014
Article Copyright 2014 by 4Dinand2
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid