Replies: 1 comment 6 replies
-
I think getting the cursor position isn't quite doable with templater. Would def need to interface with CodeMirror, if I understand correctly. I'll see if I can find something. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Struggling to get the position of the cursor (indentation level) and then use that inside the template.
Basically what I want to do is when a template is inserted not at first char position, then the whole template will be indented with the same level where the cursor was.
Pretty sure I need some custom js code for this, access the obsidian (or rather codemirror?) internal api , assign the cursor position to a variable? But I'm not that familiar with the above to be able to successfully piece it together myself it seems. So any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions