Change plugin's name and add option to add any arbitrary wrapping element
ManasMadrecha opened this issue · 2 comments
This plugin has so much potential. We can literally add any wrapping element with any class or style and assign any Hotkey using this plugin.
For my personal use, I have added this extra code in the main.js
file on my PC, to mark any text as red.
this.addCommand({
id: "toggle-span-red-text",
name: "Toggle stext into red",
callback: function () { return _this.urlIntoSelection("<span style='color:red;'>", "</span>"); },
hotkeys: [
{
modifiers: ["Mod", "Shift"],
key: "r",
},
],
});
So, I can use this plugin (and Hotkeys) to mark up my docs using arbitrary HTML styles, which otherwise is such a hassle while typing each HTML tag manually in markdown.
But the issue is that currently, I need to edit the main.js
file manually. It would be great if the plugin's settings dialog itself had the option to manually add any wrapping texts, and save them in a data.json
file. Also, whenever the plugin updates, I won't have to update the main.js
again manually with my code.
This is exactly what I want to do too! But these months I've been too busy to update the code. (Thoughts are just in my mind, but have not been split into sub-tasks).
Are you interested in collaborating on the update? The first step I think is to find a sample to add self-config in the setting. Maybe can learn from QuickAdd or some else. I don't know whether there is a document about this since I've not developed Obsidian's plugin for a long time I think.
Sorry for the late reply, I missed some github notification emails before.