Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@andrigamerita
Copy link
Contributor

Since I started to use HTMLy, the Markdown editor has always felt kind of strange to me for long posts. After a bit of reflecting, I noticed that this is because any other normal text or blog editor (Notepad, Word, WordPress, even specialized Markdown editors) don't often have the quirks of a form-based webpage, where you have the textarea that holds the main content that is just a little element on a scrolling page with many other elements, which instead HTMLy does.

This is uncomfortable in general, because the scrolling of the page in general tends to hide formatting buttons from view when writing, or even cause double scrolling when the textarea is shorter than the text contained (and the textarea in HTMLy does not resize to grow or shrink based on the content, so double scrolling always happens). On mobile, where screen space is little and browsers cause even more layout shifts when the virtual keyboard is opened or closed, this is an even bigger issue.

This commit, then, adds a small improvement to the existing Markdown editor, which otherwise continues working as usual, in the form of a toggleable fullscreen view, which can be activated or deactivated by pressing CTRL+P or the dedicated button in the editor toolbar. When deactivated (default), as said, the editor continues working as usual. When activated, using some CSS transformations, the editor area is placed in a way to cover the entire page viewport, showing the editor toolbar at the top, and the textarea below, set to take all remaining available space. Screenshots attached for demonstration; tested on both Firefox and Chromium on desktop, and Chromium on Android.

Additionally, with some extra JavaScript that dynamically inserts a special meta viewport value, as illustrated in https://developer.chrome.com/blog/viewport-resize-behavior, when using the editor in this new fullscreen mode on mobile the viewport is resized automatically to account for the virtual keyboard, keeping the textarea always fully visible and preventing the double scrolling discussed above. In short, I think this addition can improve the editing experience for anyone.

@danpros danpros merged commit 591bdd7 into danpros:master Sep 22, 2025
@danpros
Copy link
Owner

danpros commented Sep 22, 2025

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants