I'm creating a "Create a new newspage"-gadget and want to implement a wysiwyg for the MainBody-property (XhtmlString).
When I use:
<%= Html.EditorFor(x => x.MainBody) %>
it only shows an a standard text-input, no textarea and no tinyMCE-editor.
Do I have to create a new editor or how can I hook up EPi's editor to the property?
My code is as follows:
<% Html.BeginGadgetForm("Save"); %> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label> Rubrik</label> <%= Html.EditorFor(x => x.Headline) %> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label> Nyhetsdatum</label> <%= Html.EditorFor(x => x.NewsDate) %> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label> Brödtext</label> <%= Html.EditorFor(x => x.MainBody) %> </div> </div> </div> <%= Html.AcceptButton() %> <%= Html.CancelButton(null, new { action="someview"})%> <% Html.EndForm(); %>
Maybe this link will help - http://stackoverflow.com/questions/22527120/tinymce-on-gadget-of-episerver
I'm creating a "Create a new newspage"-gadget and want to implement a wysiwyg for the MainBody-property (XhtmlString).
When I use:
it only shows an a standard text-input, no textarea and no tinyMCE-editor.
Do I have to create a new editor or how can I hook up EPi's editor to the property?
My code is as follows: