lizard-heart4k downloadsPrepend or append specified content to a note (existing or new) without opening another pane.
An Obsidian plugin to add (prepend or append) specified content to a note (existing or new) without opening another pane.
As requested in this forum post.
[[title of new file]]>>{content you want to appear in file}[[title of new file]], will create the file, and add the content within the brackets to it, all without leaving the currently open note.[[title for new file|>>alternate title]]>>{}[[title for new file|alternate title]] and will also add the alias you wrote, in this case "alternate title," to the yaml frontmatter of the new note, like this:---
alias: alternate title
---
To adjust how the text is pushed to a note, you can add inline settings within the curly brackts by using the inline settings characters (by default @@). Currently, the only available inline settings are:
For example, to tell the plugin to prepend content, you could write: [[title of existing file]]>>{content to add at the beginning@@prepend}
First, you can customize the string of characters the plugin will look for when pushing content to a file. Make this something you don't often type elsewhere. The default is >>. For example, if you changed this setting to %%%, you would type something like [[title]]%%%{content} to push content to a new note.
The next setting allows you to customize the characters used to to tell the plugin when to look for inline settings within the curly brackts.
The third setting allows you to toggle on Automatic Push. This will automatically check for any text in the correct format when you switch to a new line in your note. This way you never have to run the plugin's command to trigger the note creation. You will still be able to run the command manually at any time.
The fourth setting allows you to toggle whether content being pushed to new notes will be added to the beginning or to the end of the note. By default, the content will be appended (added to the end), but turning the toggle on will add new content to the beginning.