将代码段动态添加到编辑器工具栏剑道



我想将片段动态添加到编辑器工具栏 kendo ui我使用此代码

@(Html.Kendo().Editor()
      .Name("textarea_question")
      .HtmlAttributes(new { @class = "span5", style = "height:10px;" })
      .Tools(tools => tools.Clear()
      .Bold().Italic().Underline()
      .Formatting()
      .JustifyLeft()
      .JustifyCenter()
      .JustifyRight()
      .JustifyFull()
      .Snippets(s => 
        {
          foreach (var item in Model.pipingText)
              {
                    s.Add(item.Name, item.Name);
              }
        })
  )
)

但它有错误

Failed to load resource: the server responded with a status of 500 (Internal Server Error) 

请帮帮我!!

管道文本集合中获取的这些值可能有问题,因为其余代码看起来不错。也许你应该使用类型集合而不是使用 var

那 500 状态到底是什么例外。提供有关异常的详细信息。

最新更新