mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
Migrate onToolbarCreate
to the DiscourseAPI
This commit is contained in:
@ -3,6 +3,7 @@ import ComposerEditor from 'discourse/components/composer-editor';
|
||||
import { addPosterIcon } from 'discourse/widgets/poster-name';
|
||||
import { addButton } from 'discourse/widgets/post-menu';
|
||||
import { includeAttributes } from 'discourse/lib/transform-post';
|
||||
import { addToolbarCallback } from 'discourse/components/d-editor';
|
||||
|
||||
let _decorateId = 0;
|
||||
function decorate(klass, evt, cb) {
|
||||
@ -86,6 +87,10 @@ class PluginApi {
|
||||
addButton(name, callback);
|
||||
}
|
||||
|
||||
onToolbarCreate(callback) {
|
||||
addToolbarCallback(callback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let _pluginv01;
|
||||
|
Reference in New Issue
Block a user