开发者

How to add icon in tinymce?

开发者 https://www.devze.com 2023-01-30 16:58 出处:网络
Once user click toggle full screen mode. i need开发者_运维问答 to add insertimage icon into tinymce.

Once user click toggle full screen mode. i need开发者_运维问答 to add insertimage icon into tinymce.

Once user clicks insert image icon i need to call thickbox. How can i do that. I am using jquery tinymce. (If ques is not clear refer wordpress advanced texteditor)


If it would be ok to have that image visible when tinymce UI is visible you can implement an icon/button using an own plugin + this code

init : function(ed, url) {

  // To create a tinymce command use
  var t = this;
  ed.addCommand('mycommand', t.my_function, t);  // my function need to be a function inside your plugin

  createControl: function(n, cm) {

    // Register button
    c = cm.createButton(n, {
      title : 'Title',
      cmd : 'registered_tinymce_command',
      image : 'http://myserver.com/images/buttonimage.png',
      scope: t
    });
    return c;
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消