Tuesday, September 29, 2009

What Are The Button On The X 7 Pocketbike

Text Editor ASP. NET MVC

When developing an application that will contend sections where you need to enter formatted text, it is always useful text editor that allows us this these are used in various types of applications, this time I'll show you how to use the CKEditor with ASP. NET MVC.

The first thing to do is download libraries, unzip and copy the / Content / js / then add the reference to ckeditor.js file at the hearing which will be used or if you want to masterpage entire application would be something like this

  \u0026lt;    script src =   "../../ Content / js / CKEditor / ckeditor.js "   type  =" text / javascript " >   \u0026lt;/     script>  

With this we have the reference to the script to use, put it to work now to add the following


 \u0026lt;% = Html.TextArea ("  Description", " "   new {@ name = "description  "})%> 
\u0026lt;script type=" text/javascript ">
//<![CDATA[

// This call can be placed at any point after the
// <textarea>, or inside a <head><script> in a
// window.onload event handler.

// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
CKEDITOR.replace(" Descripcion ");


//]]> \u0026lt;/ script>
 
 With this we can achieve something 
  ckeditor  
 

This editor has many options such as show only a few commands, skins, among others, I invite you to review this very good

0 comments:

Post a Comment