QuickAdd macro replays on Android
I have several QuickAdd macros that do simple string manipulation on selected text. For example, one macro adds … tags around a selection.
The macros work fine on Linux Obsidian. But on Android, after I execute a macro once, it will run on autoplay whenever I select text for any reason. So I am not able to select text for any other purpose, for example if I want to apply bold formmating QuickAdd executes the macro as soon as I select the text to format. This happens not only on one macro but with other QuickAdd macros that do other formatting.
“Run on plugin load” is NOT enabled.
I first had the macro assigned to the ribbon but removed the shortcut. This behavior still happens even if I run from the Obsidian command panel.
I have searched the forum and the documentation for QuickAdd and Android reports and I don’t believe this has been reported.
Here is the code for the macro:
module.exports = async function (params) {
const editor = app.workspace.activeEditor?.editor;
if (!editor) return;
const selectedText = editor.getSelection();
if (!selectedText) return;
editor.replaceSelection(`<ins>${selectedText}</ins>`);
};