kendo-uikendo-editor

how to use splitButton in kendo-ui editor toolbar


Kendo tool bar has a "splitButton" type but I can't figure out how to use it in an editor toolbar.

just adding one item in tools array does not show it at all

{
  type: "splitButton",
  text: "Insert",
  menuButtons: [
      { text: "Insert above", icon: "insert-up" },
      { text: "Insert between", icon: "insert-middle" },
      { text: "Insert below", icon: "insert-down" }
  ]
},

Solution

  • I think kendo toolbar and the toolbar inside kendo editor is NOT the same (please correct me if i'm wrong), and split Button is not an option there. From the docs tools array has some options (which you can read on the docs link i provided)

    One way to do that is

    1. use custom template
    2. initiate the toolbar
    3. and create event handler that has reference to the kendo editor
    4. and you need to take care of the styling too.

    (this is what i made up, not sure if it is what you need), check this example