简体   繁体   中英

How do I show the sidebar in Tiny MCE 4.5?

In the newest documentation for TinyMCE 4.5, there is some sample code for adding sidebars to your editor. I've tried adding this sample code to my project (and it successfully populates a sidebar array in the editor object), but I can't find out how to actually show the sidebar.

Does anyone know how to actually show the sidebar once it has been added?

The sample code (which I've tried adding to my project) is:

editor.addSidebar('mysidebar', {
  tooltip: 'My sidebar',
  icon: 'settings',
  onrender: function (api) {
    console.log('Render panel', api.element());
  },
  onshow: function (api) {
    console.log('Show panel', api.element());
    api.element().innerHTML = 'Hello world!';
  },
  onhide: function (api) {
    console.log('Hide panel', api.element());
  }
});

The page from the TinyMCE help that I'm using is: TinyMCE - Create a sidebar

Not quite sure what you mean, if there is a sidebar configured, it will appear to the right of the content area.

http://fiddle.tinymce.com/gEfaab

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM