locked
intergrate ckeditor RRS feed

  • Question

  • User-673128616 posted

    I have mvc application. i want intergrate ckeditor? How can i do it

    lakmal

    Monday, March 18, 2013 11:19 PM

Answers

All replies

  • User281315223 posted

    There really isn't anything majorly different from implementing the CKEditor in MVC as there is in WebForms or a pure HTML page. You can use the instructions from the CKEditor Implementation Guide from their site.

    You'll just need to include the required Javascript references and add the proper code with your View :

    <!-- Your CKEditor Script Reference -->
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    
    <!-- The actual editor and require script to initialize it -->
    <textarea id="YourEditor" name="YourEditor"><textarea>
    <script type="text/javascript">
        CKEDITOR.replace( 'YourEditor );
    </script>

    If you plan on posting the value to your Model or Controller, you'll just need to ensure that it is contained in a <form> element and its id and name attributes match your property name.

    Monday, March 18, 2013 11:25 PM
  • User197322208 posted

    just put the js like in a html file.

    Monday, March 18, 2013 11:32 PM
  • User-71674297 posted

    Hi,

    Hi,

    here is source code of a example. in this example i used fck and tinymce editor togather. its easy. to run this example install iis express 7 , then run this source code.

    http://dl.dropbox.com/u/56887191/FCK%20Editor%20(1).7z

    Monday, March 18, 2013 11:35 PM
  • User-673128616 posted

    I manage intergrate ckeditor, But when i try to save data this error raise

    A potentially dangerous Request.Form value was detected from the client (Decsription="<p>jhll</p>

    <p>hj...").


    My application i develop using MVC3 and Entity framework



    Tuesday, March 19, 2013 1:09 AM
  • User1991567628 posted

    maybe you can check this article.

    http://kevintsengtw.blogspot.tw/2011/12/aspnet-mvc-3-ckeditor.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 19, 2013 1:45 AM