【问题标题】:add snippets dynamically to the editor toolbar kendo将片段动态添加到编辑器工具栏 kendo
【发布时间】:2014-01-15 06:11:04
【问题描述】:

我想将 sn-ps 动态添加到编辑器工具栏 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) 

请帮帮我!!!

【问题讨论】:

    标签: kendo-ui


    【解决方案1】:

    您从 pipingText 集合中获得的这些值可能有问题,因为其余代码看起来不错。可能您应该使用类型集合而不是使用 var

    那个 500 状态的例外是什么。提供有关异常的更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-18
      • 1970-01-01
      • 1970-01-01
      • 2015-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多