Basically, I have a mime renderer and I want to add a toolbar button that can implement the save action, just like saving from Jupyterlab interface either by shortcut or dropdown menu.
I notice the toolbar is minimized and I can easily add an item to that toolbar. However, I don’t know how to make the button to implement the save. Based on my finding, I think the save action can be call using app.commands.excecute('docmanager:save) but I’m having trouble getting it to work or even calling it.
Is there a way to implement the save action in a mime extension or could you point me to a beginner friendly documentation on it?
I think you will need to convert your mime extension into a normal extension, which gives you access to the tools to save things, etc. In other words, you’ve gone beyond what the simple, lightweight mime extensions were designed for. Mime extensions are designed to be lightweight renderers of provided content, and are used in a variety of contexts, some of which involve documents and some of which may not involve documents.
What happens when 2 or more mimerenderer extensions are registered for the same mime type; such as application/json and application/ld+json? Does such a user configuration situation prohibit normal extension development?