Я использовал следующий ViewUserControl
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<script type="text/javascript">
// note that the editor text area must have an id of articleBody
tinyMCE.init({
elements: "articleBody",
theme: "advanced",
mode: "exact",
height: "300",
plugins: "safari,spellchecker,pagebreak,autosave,table,advimage,iespell,inlinepopups,paste,nonbreaking,template,fullscreen,paste",
theme_advanced_buttons1: "bold,italic,underline,forecolor,|,undo,redo,|,link,unlink,pastetext,|,justifyleft,justifycenter,justifyright,|,blockquote,bullist,numlist",
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left"
});
</script>
Примечание: в Scripts / есть каталог tiny_mce с источником / langs / plugins / themes / utils
, чтобы включить его в мойстраница:
<% Html.RenderPartial("Editor"); %>
<%= Html.TextAreaFor(model => model.Draft.Body, new { name = "content", @class = "text", id = "articleBody", style = "width:100%" })%>
Вы бы поместили свою TextArea в любое место на странице, которую считаете нужной, и помните, что она будет расширена либо до ширины всех кнопок, которые вы включите, либо до 100% от div-элемента обтекания