Comments (9)
Hi, I'll think about it.
from obsidian-remember-cursor-position.
I will try to find the time
from obsidian-remember-cursor-position.
Any further thoughts on this? I am new to Obsidian but perhaps I can help somehow. In getEphemeralState does this.app.workspace.getActiveViewOfType(MarkdownView)?.currentMode? refer to the edit/preview mode?
Googling I came across: MarkdownView.setState() calls setMode() to switch the mode
from obsidian-remember-cursor-position.
Haven't found a way to do this yet.
from obsidian-remember-cursor-position.
If you let me know what the blocking point is I could try to do some research for you. Can you read the current state?
from obsidian-remember-cursor-position.
You can try to console.log(this.app) and try to find the function to read and set current mode. It will be simple to add this state to the file where the cursor position is saved, read it and restore current mode.
from obsidian-remember-cursor-position.
app.workspace.activeLeaf.view.getMode()
app.workspace.activeLeaf.view.previewButtonEl.click()
app.workspace.activeLeaf.view.editButtonEl.click()
That is probably not the right way to set the mode. But it does work
from obsidian-remember-cursor-position.
I think, it might work. Do you have the opportunity to try to add this functionality? You need to add the "mode" field to the interface EphemeralState (line 14), get it in the function getEphemeralState (line 212) and restore it in the setEphemeralState (line 239). Next you can make this function optional (add option to settings).
from obsidian-remember-cursor-position.
I don't know the development flow etc. It would be quite a lot of time to understand all that. I can buy you a coffee ;)
from obsidian-remember-cursor-position.
Related Issues (20)
- Support in Reading mode please! HOT 1
- Obsidian 1.x: functional conflict with plugin shichongrui/obsidian-reveal-active-file HOT 1
- Support for obsidian zoom
- Obsidian 1.x: causes the entire page to shift up sometimes HOT 1
- [FR]: Add command to go back and forth like VSCode HOT 2
- 死活就是不生效 HOT 5
- 卡顿问题
- Doesn't work when clicking a task in a Dataview list and going to file
- 插件无法生效
- Not working after update to 1.4.5 HOT 3
- Not working on Android HOT 4
- Cursor position persists when heading level target is initiated HOT 4
- Twitching behaviour since last update HOT 2
- Cursor repositions when note is back in focus and I want to type HOT 1
- When same document is opened in multiple tabs and one tab is hidden, the other tab tries to restore the hidden tab scrolling position
- When switching notes, the page flashes and cannot scroll for a period of time HOT 2
- On mobile ios plugin scrolls for link [[page#header]] even with max delay HOT 1
- [Feature Request] Drop out of range date HOT 1
- Please disable, when having documents already open and working with two or more panes HOT 10
- [feature request] multiple cursor positions (each linked to a different tab) for same file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-remember-cursor-position.