Add code block actions plugin extensibility (#24348)

* Add code block actions plugin extensibility

* Fixing tests

* Fixing linter errors

* Move Plugin components left of label

---------

Co-authored-by: Christopher Speller <crspeller@gmail.com>
Этот коммит содержится в:
Jesús Espino
2023-08-29 23:51:37 +02:00
коммит произвёл GitHub
родитель dbb39e44cc
Коммит 8c8b8b7e79
6 изменённых файлов: 1029 добавлений и 519 удалений

Просмотреть файл

@@ -508,6 +508,12 @@ export default class PluginRegistry {
return dispatchPluginComponentAction('PostEditorAction', this.id, component);
});
// Register a component to the add to the code block header.
// Accepts a React component. Returns a unique identifier.
registerCodeBlockActionComponent = reArg(['component'], ({component}: DPluginComponentProp) => {
return dispatchPluginComponentAction('CodeBlockAction', this.id, component);
});
// Register a component to the add to the new messages separator.
// Accepts a React component. Returns a unique identifier.
registerNewMessagesSeparatorActionComponent = reArg(['component'], ({component}: DPluginComponentProp) => {