How do I manually trigger the Plugin Editor without changing the note. "onActivationCheck" only triggers if there is a note change.
What can I do?
There is a showEditorPlugin command, which can be used to display/hide the editor
import { CommandContext, CommandDeclaration, CommandRuntime } from '../services/CommandService';
import getActivePluginEditorView from '../services/plugins/utils/getActivePluginEditorView';
import Logger from '@joplin/utils/Logger';
import getActivePluginEditorViews from '../services/plugins/utils/getActivePluginEditorViews';
import PluginService from '../services/plugins/PluginService';
import WebviewController from '../services/plugins/WebviewController';
import Setting from '../models/Setting';
const logger = Logger.create('showEditorPlugin');
export const declaration: CommandDeclaration = {
name: 'showEditorPlugin',
label: () => 'Show editor plugin',
iconName: 'fas fa-eye',
};
export const runtime = (): CommandRuntime => {
return {
execute: async (context: CommandContext, editorViewId = '', show = true) => {
Naa Bro, this command only works if the editorPlugin is active, for it be activate I need to trigger onActivationCheck first. And I don't want to change the note that I'm viewing right now. I would like to get it triggered via command.