ASP.NET MVC not show ckeditor -


there 1 layout page , 1 page using layout page. in create page there 1 textarea id= editor1. in js , css load successful. ckeditor not show, blank textarea

the output:

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>sb admin 2 - bootstrap admin theme</title> <!-- bootstrap core css --> <link href="/css/bootstrap.css" rel="stylesheet"> <link href="/css/font-awesome.css" rel="stylesheet"> <link href="/css/sb-admin-2.css" rel="stylesheet"> <link href="/css/jquery-ui.css" rel="stylesheet" /> <script src="/js/jquery-1.10.2.min.js"></script> <script src="/ckeditor/ckeditor.js"></script> <script src="/js/jquery-ui.js"></script> <link href="/css/jquery-ui/style.css" rel="stylesheet"/> <script type="text/javascript">     $('#editor1').ckeditor(); </script> <script src="/ckeditor/ckeditor.js"></script>  <!-- metismenu css --> <link href="../bower_components/metismenu/dist/metismenu.min.css" rel="stylesheet"> <!-- custom css --> <link href="../dist/css/sb-admin-2.css" rel="stylesheet"> <!-- custom fonts --> <link href="../bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <!-- html5 shim , respond.js ie8 support of html5 elements , media queries --> <!-- warning: respond.js doesn't work if view page via file:// --> <!--[if lt ie 9]>     <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>     <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]-->  </head> <body>     <div id="wrapper">         <!-- navigation -->         <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">             <div class="navbar-header">                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">                     <span class="sr-only">toggle navigation</span>                     <span class="icon-bar"></span>                     <span class="icon-bar"></span>                     <span class="icon-bar"></span>                 </button>                 <a class="navbar-brand" href="index.html">sb admin v2.0</a>             </div>             <!-- /.navbar-header -->             <ul class="nav navbar-top-links navbar-right">                 <li class="dropdown">                     <a class="dropdown-toggle" data-toggle="dropdown" href="#">                         <i class="fa fa-envelope fa-fw"></i>  <i class="fa fa-caret-down"></i>                     </a>                     <ul class="dropdown-menu dropdown-messages">                         <li>                             <a href="#">                                 <div>                                     <strong>john smith</strong>                                     <span class="pull-right text-muted">                                         <em>yesterday</em>                                     </span>                                 </div>                                 <div>lorem ipsum dolor sit amet, consectetur adipiscing elit. pellentesque eleifend...</div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <strong>john smith</strong>                                     <span class="pull-right text-muted">                                         <em>yesterday</em>                                     </span>                                 </div>                                 <div>lorem ipsum dolor sit amet, consectetur adipiscing elit. pellentesque eleifend...</div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <strong>john smith</strong>                                     <span class="pull-right text-muted">                                         <em>yesterday</em>                                     </span>                                 </div>                                 <div>lorem ipsum dolor sit amet, consectetur adipiscing elit. pellentesque eleifend...</div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a class="text-center" href="#">                                 <strong>read messages</strong>                                 <i class="fa fa-angle-right"></i>                             </a>                         </li>                     </ul>                     <!-- /.dropdown-messages -->                 </li>                 <!-- /.dropdown -->                 <li class="dropdown">                     <a class="dropdown-toggle" data-toggle="dropdown" href="#">                         <i class="fa fa-tasks fa-fw"></i>  <i class="fa fa-caret-down"></i>                     </a>                     <ul class="dropdown-menu dropdown-tasks">                         <li>                             <a href="#">                                 <div>                                     <p>                                         <strong>task 1</strong>                                         <span class="pull-right text-muted">40% complete</span>                                     </p>                                     <div class="progress progress-striped active">                                         <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">                                             <span class="sr-only">40% complete (success)</span>                                         </div>                                     </div>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <p>                                         <strong>task 2</strong>                                         <span class="pull-right text-muted">20% complete</span>                                     </p>                                     <div class="progress progress-striped active">                                         <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">                                             <span class="sr-only">20% complete</span>                                         </div>                                     </div>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <p>                                         <strong>task 3</strong>                                         <span class="pull-right text-muted">60% complete</span>                                     </p>                                     <div class="progress progress-striped active">                                         <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">                                             <span class="sr-only">60% complete (warning)</span>                                         </div>                                     </div>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <p>                                         <strong>task 4</strong>                                         <span class="pull-right text-muted">80% complete</span>                                     </p>                                     <div class="progress progress-striped active">                                         <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">                                             <span class="sr-only">80% complete (danger)</span>                                         </div>                                     </div>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a class="text-center" href="#">                                 <strong>see tasks</strong>                                 <i class="fa fa-angle-right"></i>                             </a>                         </li>                     </ul>                     <!-- /.dropdown-tasks -->                 </li>                 <!-- /.dropdown -->                 <li class="dropdown">                     <a class="dropdown-toggle" data-toggle="dropdown" href="#">                         <i class="fa fa-bell fa-fw"></i>  <i class="fa fa-caret-down"></i>                     </a>                     <ul class="dropdown-menu dropdown-alerts">                         <li>                             <a href="#">                                 <div>                                     <i class="fa fa-comment fa-fw"></i> new comment                                     <span class="pull-right text-muted small">4 minutes ago</span>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <i class="fa fa-twitter fa-fw"></i> 3 new followers                                     <span class="pull-right text-muted small">12 minutes ago</span>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <i class="fa fa-envelope fa-fw"></i> message sent                                     <span class="pull-right text-muted small">4 minutes ago</span>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <i class="fa fa-tasks fa-fw"></i> new task                                     <span class="pull-right text-muted small">4 minutes ago</span>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="#">                                 <div>                                     <i class="fa fa-upload fa-fw"></i> server rebooted                                     <span class="pull-right text-muted small">4 minutes ago</span>                                 </div>                             </a>                         </li>                         <li class="divider"></li>                         <li>                             <a class="text-center" href="#">                                 <strong>see alerts</strong>                                 <i class="fa fa-angle-right"></i>                             </a>                         </li>                     </ul>                     <!-- /.dropdown-alerts -->                 </li>                 <!-- /.dropdown -->                 <li class="dropdown">                     <a class="dropdown-toggle" data-toggle="dropdown" href="#">                         <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>                     </a>                     <ul class="dropdown-menu dropdown-user">                         <li>                             <a href="#"><i class="fa fa-user fa-fw"></i> user profile</a>                         </li>                         <li>                             <a href="#"><i class="fa fa-gear fa-fw"></i> settings</a>                         </li>                         <li class="divider"></li>                         <li>                             <a href="login.html"><i class="fa fa-sign-out fa-fw"></i> logout</a>                         </li>                     </ul>                     <!-- /.dropdown-user -->                 </li>                 <!-- /.dropdown -->             </ul>             <!-- /.navbar-top-links -->             <div class="navbar-default sidebar" role="navigation">                 <div class="sidebar-nav navbar-collapse">                     <ul class="nav" id="side-menu">                         <li class="sidebar-search">                             <div class="input-group custom-search-form">                                 <input type="text" class="form-control" placeholder="search...">                                 <span class="input-group-btn">                                     <button class="btn btn-default" type="button">                                         <i class="fa fa-search"></i>                                     </button>                                 </span>                             </div>                             <!-- /input-group -->                         </li>                         <li>                              <a href="/home">                                 <i class="fa fa-dashboard fa-fw"></i> dashboard                             </a>                         </li>                         <li>                             <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> quản lý chung<span class="fa arrow"></span></a>                             <ul class="nav nav-second-level">                                 <li>                                     <a href="/">quản lý loại</a>                                 </li>                                 <li>                                     <a href="/bedanhmuc">quản lý danh mục</a>                                 </li>                                 <li>                                     <a href="/besach">quản lý sách</a>                                 </li>                                 <li>                                     <a href="/betacgia">quản lý tác giả</a>                                 </li>                                 <li>                                     <a href="/benxb">quản lý nhà xuất bản</a>                                 </li>                                 <li>                                     <a href="/bedoitac">quản lý đối tác vận chuyển</a>                                 </li>                                 <li>                                     <a href="/betinhthanh">quản lý tỉnh thành</a>                                 </li>                                 <li>                                     <a href="/bedonhang">quản lý Đơn hàng</a>                                 </li>                             </ul>                             <!-- /.nav-second-level -->                         </li>                         <li>                              <a href="/forms"><i class="fa fa-table fa-fw"></i>form</a>                         </li>                         <li>                             <a href="forms.html"><i class="fa fa-edit fa-fw"></i> forms</a>                         </li>                         <li>                             <a href="#"><i class="fa fa-wrench fa-fw"></i> ui elements<span class="fa arrow"></span></a>                             <ul class="nav nav-second-level">                                 <li>                                     <a href="panels-wells.html">panels , wells</a>                                 </li>                                 <li>                                     <a href="buttons.html">buttons</a>                                 </li>                                 <li>                                     <a href="notifications.html">notifications</a>                                 </li>                                 <li>                                     <a href="typography.html">typography</a>                                 </li>                                 <li>                                     <a href="icons.html"> icons</a>                                 </li>                                 <li>                                     <a href="grid.html">grid</a>                                 </li>                             </ul>                             <!-- /.nav-second-level -->                         </li>                         <li>                             <a href="#"><i class="fa fa-sitemap fa-fw"></i> multi-level dropdown<span class="fa arrow"></span></a>                             <ul class="nav nav-second-level">                                 <li>                                     <a href="#">second level item</a>                                 </li>                                 <li>                                     <a href="#">second level item</a>                                 </li>                                 <li>                                     <a href="#">third level <span class="fa arrow"></span></a>                                     <ul class="nav nav-third-level">                                         <li>                                             <a href="#">third level item</a>                                         </li>                                         <li>                                             <a href="#">third level item</a>                                         </li>                                         <li>                                             <a href="#">third level item</a>                                         </li>                                         <li>                                             <a href="#">third level item</a>                                         </li>                                     </ul>                                     <!-- /.nav-third-level -->                                 </li>                             </ul>                             <!-- /.nav-second-level -->                         </li>                         <li class="active">                             <a href="#"><i class="fa fa-files-o fa-fw"></i> sample pages<span class="fa arrow"></span></a>                             <ul class="nav nav-second-level">                                 <li>                                     <a class="active" href="blank.html">blank page</a>                                 </li>                                 <li>                                     <a href="login.html">login page</a>                                 </li>                             </ul>                             <!-- /.nav-second-level -->                         </li>                     </ul>                 </div>                 <!-- /.sidebar-collapse -->             </div>             <!-- /.navbar-static-side -->         </nav>         <!-- page content -->         <div id="page-wrapper">    <script>     $(function () {         $("#tabs").tabs();     }); </script> <h2>create</h2>  <form action="/betacgia/create" method="post"><input name="__requestverificationtoken" type="hidden" value="kzj5sfqhjry54yaqb11hnt3f_72kkly2eg6jnofmrgtivcao4ybnuk7ad1wv7db0opeeusvdmvt96nv_twper3rkdy1pmlqjskwgdwkt-wq1" />    <div class="form-horizontal">         <h4>tacgia</h4>         <hr />         <div id="tabs">             <ul>                 <li><a href="#tabs-1">nunc tincidunt</a></li>                 <li><a href="#tabs-2">proin dolor</a></li>                 <li><a href="#tabs-3">aenean lacinia</a></li>             </ul>             <div id="tabs-1">                  <div class="form-group">                     <label class="control-label col-md-2" for="ten">ten</label>                     <div class="col-md-10">                         <input class="form-control text-box single-line" id="ten" name="ten" type="text" value="" />                         <span class="field-validation-valid text-danger" data-valmsg-for="ten" data-valmsg-replace="true"></span>                     </div>                 </div>                  <div class="form-group">                     <label class="control-label col-md-2" for="ngaysinh">ngaysinh</label>                     <div class="col-md-10">                         <input class="form-control text-box single-line" data-val="true" data-val-date="the field ngaysinh must date." data-val-required="the ngaysinh field required." id="ngaysinh" name="ngaysinh" type="datetime" value="" />                         <span class="field-validation-valid text-danger" data-valmsg-for="ngaysinh" data-valmsg-replace="true"></span>                     </div>                 </div>                  <div class="form-group">                     <label class="control-label col-md-2" for="ngaymat">ngaymat</label>                     <div class="col-md-10">                         <input class="form-control text-box single-line" data-val="true" data-val-date="the field ngaymat must date." id="ngaymat" name="ngaymat" type="datetime" value="" />                         <span class="field-validation-valid text-danger" data-valmsg-for="ngaymat" data-valmsg-replace="true"></span>                     </div>                 </div>                    <div class="form-group">                     <label class="control-label col-md-2" for="magioitinh">giới t&#237;nh</label>                     <div class="col-md-10">                         <select class="form-control" id="magioitinh" name="magioitinh"><option value="false">nữ        </option> <option value="true">nam       </option> </select>                         <span class="field-validation-valid text-danger" data-valmsg-for="magioitinh" data-valmsg-replace="true"></span>                     </div>                 </div>             </div>             </div>             <div id="tabs-2">                 <div class="form-group">                     <div class="col-md-offset-2 col-md-10">                         <textarea cols="20" id="editor1" name="editor1" rows="2"> </textarea>                     </div>                 </div>             </div>          </div>         <div class="form-group">             <div class="col-md-offset-2 col-md-10">                 <input type="submit" value="create" class="btn btn-default" />              </div>         </div> </form> <div>     <a href="/betacgia">back list</a> </div>          </div>         <!-- /#page-wrapper -->     </div>     <!-- /#wrapper -->     <!-- jquery -->      <!-- bootstrap core javascript -->        <!-- metis menu plugin javascript -->      <!-- custom theme javascript -->     <script src="../dist/js/sb-admin-2.js"></script>     <script type="text/javascript">         $("#editor1").ckeditor();     </script>     <script src="/ckeditor/ckeditor.js"></script>  <!-- visual studio browser link --> <script type="application/json" id="__browserlink_initializationdata">     {"appname":"chrome","requestid":"a0659a041f2c43debc9047700eda9c38"} </script> <script type="text/javascript" src="http://localhost:51010/3ea56a66c2ef4b65975354424aa8f008/browserlink" async="async"></script> <!-- end browser link -->  </body> </html> 

thanks edit, it's little more clear now. long comment.

here's things might want have at

  • you have $('#editor1').ckeditor(); 2 times, remove first
  • you have <script src="/ckeditor/ckeditor.js"></script> 3 times, remove 2nd , 3rd
  • replace 2nd $('#editor1').ckeditor(); ckeditor.replace( 'editor1' );

are using cke jquery adapter or did come jquery-like selector on own or..? have errors in browser dev console?


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -