I'm using Stackedit with Google Drive. Currently, it's not possible to have two different files open. Is this a bug or a feature?
It's a feature. For now you can't have 2 instances of StackEdit in the same browser. It protects from modifying one local document from 2 different windows. You can still switch from one document to another in your unique StackEdit instance by clicking the open button in the navigation bar.
--EDIT--
You can use the Ctrl+[ and Ctrl+] shortcuts to toggle document. Shortcuts and document order (alphabetical or most recently used) can be customized in Settings -> Extensions -> Document Selector.
@benweet: Is there any way you can protect from editing the same document in multiple windows without the restriction on multiple windows in general?
Hi @p2edwards
The problem is a bit more complex. It's not only editing, it's also periodic synchronization (upload and download to/from Google Drive or Dropbox) which can apply not just to the current document. If performed simultaneously, it could be seriously destructive.
As I understand, the need is to switch easily from one document to the previous one (most recently used). Maybe a key shortcut like Ctrl+Tab could be useful. What do you think?
Regards
@benweet: That makes sense. And I suppose side-by-side editing might be less important if toggling documents was super simple.
Meanwhile, StackEdit won't load for me anymore. Just gets stuck with the grey header bar and grey background but no icons. Not sure what I did to make this happen, but restarting Chrome / clearing the cache didn't fix it.
Uncaught SyntaxError: Unexpected token u main-min.js:517
(anonymous function) main-min.js:517
x.each.x.forEach main-min.js:517
x.(anonymous function) main-min.js:517
(anonymous function) main-min.js:517
x.each.x.forEach main-min.js:517
(anonymous function) main-min.js:517
context.execCb require.js:1635
Module.check require.js:871
(anonymous function) require.js:1112
(anonymous function) require.js:129
(anonymous function) require.js:1155
each require.js:57
Module.emit require.js:1154
Module.check require.js:925
(anonymous function) require.js:1112
(anonymous function) require.js:129
(anonymous function) require.js:1155
each require.js:57
Module.emit require.js:1154
Module.check require.js:925
(anonymous function) require.js:1112
(anonymous function) require.js:129
(anonymous function) require.js:1155
each require.js:57
Module.emit require.js:1154
Module.check require.js:925
(anonymous function) require.js:1112
(anonymous function) require.js:129
(anonymous function) require.js:1155
each require.js:57
Module.emit require.js:1154
Module.check require.js:925
(anonymous function) require.js:1112
(anonymous function) require.js:129
(anonymous function) require.js:1155
each require.js:57
Module.emit require.js:1154
Module.check require.js:925
Module.enable require.js:1142
Module.init require.js:779
callGetModule require.js:1169
context.completeLoad require.js:1549
context.onScriptLoad require.js:1656
This kinda interrupts the analysis on my end... has this happened to anyone else recently? Completely different problem, sorry about that.
All due respect
On chrome, you can clear the offline cache using chrome://appcache-internals/. If it doesn't fix the problem, you can run StackEdit using http://benweet.github.io/stackedit/?debug&console and send me the error.
Regards
Just added the Ctrl+[ and Ctrl+] shortcuts to toggle document. Shortcuts and document order can be customized in Settings -> Extensions -> Document Selector.
That is awesome!
Any plans on implementing the original request? I think that would be a big improvement!
+1
Would extending the localstorage file array by registering the active file in localstorage with the active windowId be a possible solution in order to create a sort of window/tab lock (when not synchronizing to google drive / whatever)?
file.%ID%.windowId = utils.id();
and then using the logic in the checkWindowUnique function at public/res/core.js to check if the same file is already open somewhere else?
+1
+1
I'd like to put my vote in for this feature as well. I understand the complexity of having to keep track/sync the same file across multiple instances. However, I have another use for it. I'd like to be able to open multiple documents to combine parts and/or review to see if they could be combined. As it stands right now, that can only be done, by opening one, reading it, closing it and opening another. This isn't a big need for me, but occasionally I find a use for it.
I've been thinking about how this could be done. I'm assuming that (at least with Google Drive) you're reading the unique id of each file. If you were to check, when a person tried to open another document that it didn't match a current open instance with the same id, you could allow people to open different files from Drive at the same time. Just a thought.
For now, I can use another program, but I'd love to see if this could be implemented in the future.
+1 I am typically writing on several different documents the same time. I agree with previous post. Do not allow to open the same document a second time, but why not allow to open a different document in a different browser window?
+1
For those looking for a solution to this problem: https://app.classeur.io/#!/ It works like stackedit and it allows several editor instances to be open the same time. I am using it since a while now and it is reliable.
@benweet this restriction is a total show-stopper! My workflow includes multiple files opened in different windows/screens. I write in one or two consulting the others.
I _really really_ need a toggle/workaround to lift this restriction! Btw, I don't really care if I screw it up and edit one document from two windows! That's my mistake, not yours. The app can show me a warning, but preventing a whole bunch of use cases because of that is irresponsible.
The easiest solution from the programming point of view would be to block edition in the all but the first copy of the same document. Maybe show a warning. I did not studied your code, but it looks like a local change. This is a major show-stopper!
When can we expect a resolution of this problem, namely opening several different documents in several/tabs/windows/screens?
@voddan
Your solution is to look at: http://classeur.io/ . It is the successor of stack edit. You can open the app also directly: https://app.classeur.io/#!/ I am using Classeur with exactly the same workflow as you describe. I frequently have more than 10 Classeur windows open. You can open more than one instance of the same file.
Classeur has also many new additional features. I am currently writing on a manual to make the easier accessible.
Stack Edit is no longer developed. Classeur is. Classeur is the improved version of Stack Edit. Just imagine the author implemented all your request and by the way renamed the app.
Let me know if you have any more questions,
Hubert
Thank you for the suggestion, @VillageHubertChen
It seems that classeur does not allow me to open an arbitrary .md file from my Google Disk, so I can't use it for my existing files.
Stackedit is still unique, I just hope that this misunderstanding will be resolved soon enough.
@voddan
Thanks for your reply. Your post did not mentioned Google Drive, but I see now that the first post did. My apologies for any misunderstanding! Now lets move on to try to solve your problem.
It may be possible that I have a solution for you and then maybe not. We are a decent sized team of collaborative writers. We used google drive / google docs previously for our collaborative writing.
If you would describe me your workflow and your targets I may be able to come up with an acceptable solution for you.
The v5 now supports multiple tabs.