Reputation: 19197
I am using MVC.NET and CKEditor and want to prefill the textarea so on edit forms the text is already loaded.
I try with:
<%= Html.TextBox("Message", Model.Message) %>
I can see that the textarea contains the correct text, but since CKEditor alters the html, it isn't inserted into the editor. Is there a way to hack it so I can insert the text into the form?
Upvotes: 2
Views: 899
Reputation: 19197
It was a stupid error, a simple:<%= Html.TextAreaFor(model => model.Message) %>
made it work.
Upvotes: 1
Reputation: 1547
CKEditor is desined for WebForms and its designed in such a way to depend on the external dependencies like request and response.
Unless the CKEditor company provides the helper extension for MVC you will not be able to do that. You can also search if there is any extension points provided like interfaces.
Upvotes: 0