Reputation: 333
I don't know how to use CKEditor in Mvc2 Framework.
I tried but it will not work
<%= Html.TextAreaFor(model => model.ABSTRACT) %>
<script type="text/javascript">
$(document).ready(function() {
$("$ABSTRACT").ckeditor();
});
</script>
Upvotes: 0
Views: 187
Reputation: 9271
Change the $
with #
and it should definitely works
$("#ABSTRACT").ckeditor();
also be sure to have this 2 scripts referenced in your page.
<script type="text/javascript" src="@Content.Url("~/yourpath/ckeditor/ckeditor.js")"></script>
<script type="text/javascript" src="@Content.Url("~/yourpath/ckeditor/adapters/jquery.js")"></script>
You can also consider to associate ckEditor to a class instead of the Id of controls. so with only one call you can set the editor for all the control that have that class in your apps.
Upvotes: 1
Reputation: 66
Is there any way you could just use the asp.net usercontrol for ckeditor?
http://ckeditor.com/download 3rd one down.
I have not tried it in mvc but I do not see why it would not work in MVC.
Upvotes: 1