使用Rich Text Editor for ASP.NET和MVC 8.0.1中的Simple Editor

时间:2013-11-22 19:29:16

标签: asp.net-mvc-4

如何使用Rich Text Editor for ASP.NET和MVC 8.0.1中的Simple Editor?

我正在使用以下代码:

  public ActionResult Index()
        {
            Editor Editor1 = new Editor(System.Web.HttpContext.Current, "Editor1");
            Editor1.LoadFormData("Content");
            Editor1.MvcInit();
            ViewBag.Editor = Editor1.MvcGetString();
            return View();
        }

如何使用简单模式?

简单模式:http://richtexteditor.com/demo/simple_editor.aspx

2 个答案:

答案 0 :(得分:0)

我发现:

Editor1.Toolbar = "minimal";

答案 1 :(得分:0)

文档中都有。

public ActionResult Index()
{
    Editor Editor1 = new Editor(System.Web.HttpContext.Current, "Editor1");
    Editor1.LoadFormData("Content");
    Editor1.MvcInit();
    Editor1.RenderMode = RTERenderMode.Simple;
    ViewBag.Editor = Editor1.MvcGetString();
    return View();
}

相关文件:

  1. RenderMode property
  2. RTERenderMode enumeration