Add option for relative to button line insert into note #347
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part solution for issue #296.
Enables prepending and appending content in relation to the button. A toggle inside the
insertIntoNote
action now enables/disables the relative option.On disable the functionality is all the same.
On enable it allows values below
0
; a-1
for example will add the content directly in front of the button. A1
would add it directly behind it.Employs the position parameter and it's relevant
.getPosition()
function.Extended the respective test by adding the new variable. It is only set to false and I haven't (yet) added a new test case that would correctly test the new functionality automatically. I did test it manually though...
Running
bun run test
successfully completed.bun run check
led to an error as it couldn't find the packageprettier-plugin-svelte
. But this error already occurred before I changed anything so I figured it may not be due to my changes. Possibly it's something on my machine but I'm not sure. The file it tries to import it from.\obsidian-meta-bind-plugin\noop.js
doesn't exist either.My apologies if it's an error on my part.