Overview of SunEditor Plugin Types
masterSunEditor uses a class-based plugin system where different base classes determine the UI behavior and required lifecycle methods of your plugin. Choose the base class that matches your intended user interaction:
| Base Class | static type | Required Methods | UI Behavior |
|---|---|---|---|
PluginCommand | command | action() | Button click executes action |
PluginDropdown | dropdown | action() | Button opens menu, item click calls action() |
PluginDropdownFree | dropdown-free | — | Button opens menu, plugin handles own events |
PluginModal | modal | open() | Button opens modal dialog |
PluginBrowser | browser | open(), close() | Button opens gallery browser |
PluginField | field | — | Responds to editor input events |
PluginInput | input | — | Toolbar input element |
PluginPopup | popup | show() | Inline popup context menu |