Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for relative to button line insert into note #347

Closed
wants to merge 2 commits into from
Closed

Add option for relative to button line insert into note #347

wants to merge 2 commits into from

Conversation

Tesselay
Copy link

@Tesselay Tesselay commented Jun 7, 2024

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. A 1 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 package prettier-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.

@Tesselay Tesselay closed this Jun 7, 2024
@Ramesh-X
Copy link

Ramesh-X commented Jul 4, 2024

Why is this closed? Is there an alternative?

@Tesselay
Copy link
Author

Not yet.
I closed it because I ran into some weird issues when testing it, but it did work generally. I will reimplement this, correctly, and make a pull request when I have a bit more free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants