nextcloud / notes

✎ Distraction-free notes and writing
https://apps.nextcloud.com/apps/notes
GNU Affero General Public License v3.0
608 stars 134 forks source link

preview and editor dual mode #611

Closed zeroepix closed 3 years ago

zeroepix commented 4 years ago

I was 90% sure this app didn't have the option to show the preview and editor views together, and had recently only introduced the ctrl-/ shortcut (which is an excellent addition, btw).

However, something extraordinary happened today. My cat came for some grooming, during which it splayed one of its legs across the right hand side of my keyboard. I had the notes app running, and when he got up to leave, the notes app had a whole bunch of ----- and ***** in it, and was showing the editor and preview mode side by side.

I had no idea what it pressed! I wish I'd taken a screenshot to show you, before I started guessing, because it reverted once I pressed ctrl-/ again and couldn't find it again. Does this feature already exist? Is my cat secretly a programming genius mocking my dull ape brain? I don't know! Please someone tell me what he did!

edit: if it is indeed that easy but simply lacks a shortcut, my humble suggestion is to make it ctrl-shift-/ or something similar to the toggle.

stefan-niedermann commented 4 years ago

Yes, the used editor is theoretically capable of displaying button bars and some other advanced options. However a major design goal is to provide an easy and distractionfree note editor.

Therefore i don't think that promoting or even always displaying those stuff is a goal we want to achieve. Instead we should focus on a context based popover.

stefan-niedermann commented 4 years ago

Besides that the old markdown app also supports a dual mode, but also here i personally would prefer to get rid of this separation in favor of one editor which also highlights - also the Nextcloud Text app goes this direction.

Larsene commented 4 years ago

if only notes could mimic the Text app...

stefan-niedermann commented 4 years ago

@Larsene please see https://github.com/nextcloud/notes/issues/331

Nextcloud Text does not provide a split screen neither, so your comment is independent from this issue. I explicitely linked the old and deprecated Markdown app therefore.

ghost commented 3 years ago

@zeroepix I looked through the source and tracked down that the split screen shortcut comes from EasyMDE. The shortcut is (F9).

However, this functionality was clearly not intended, so on dark mode, the split preview will not be styled properly. This can be fixed with custom css I believe if using that app. Also, this short cut puts the editor in an unintended full screen mode which has the side bar covering content and makes the content stretch all the way to the left rather than being centered.

zeroepix commented 3 years ago

@tshoyo you legend! You found it! You're right that it doesn't quite work fully, even in normal mode...but at least I know I'm not going crazy now. What's EasyMDE used for in the notes program?

ghost commented 3 years ago

@zeroepix EasyMDE (Easy Markdown Editor) appears to be the markdown editor being used behind the scenes. However, it's only used for the editing while markdown-it is used for the previews.

korelstar commented 3 years ago

Side-by-side mode is not intended in this app. We will go for a WYSIWYG-style editor, see #331