how to re-order etherpad toolbar buttons?


75 观看


41 作者的声誉

I want to reorder etherpad toolbar buttons. For inbuilt etherpad buttons, it could be done with exports.toolbar I found then comes the ones added by plugins using exports.eejsBlock_editbarMenuLeft hook. can anyone guide me re-order the ones added by exports.eejsBlock_editbarMenuLeft hook? Though the actual order I want falls in both sets e.g. Print, Import, Superscript, Bold etc.

作者: Blue 的来源 发布者: 2017 年 9 月 15 日

回应 1


41 作者的声誉


You can use postToolbarInit hook and modify the order using jQuery once all buttons are set.

exports.postToolbarInit = function (hook, context){

  var $superscript = $("#editbar li.superscript");
  var $subscript = $("#editbar li.subscript");

  var $underline = $("#editbar li[data-key=\"underline\"]");

作者: Blue 发布者: 2017 年 9 月 25 日