greenheart / tab-typer Goto Github PK
View Code? Open in Web Editor NEWA simple, offline-first text editor for your next browser tab.
Home Page: https://samuelplumppu.se/tab-typer/
A simple, offline-first text editor for your next browser tab.
Home Page: https://samuelplumppu.se/tab-typer/
This would clarify how different properties are related.
TextEditor.updateEditorHeight()
could be used to set the height depending on what file is open.Using the "New File" button should only create a new file if no blank file already exists. This will prevent the app from being filled with blank files.
A blank file...
(/\w/).test(title) === false
(/\w/).test(content) === false
If a blank file exists when the button is pressed, the user should be taken to the blank file.
const wordCount = text.trim().split(/\s+/).length
getWordCount (string) {
return string.trim().split(/\s+/).length
}
Relevant code:
https://github.com/Greenheart/tab-typer/blob/master/text-editor.js#L319-L323
To fix this, set a flag escapeKeyDown = true
when the esc key is pressed (keydown). Then only trigger toggleMenu()
when escapeKeyDown === false
.
Set escapeKeyDown = true
when the esc key is released (keyup).
Using a WebExtension allows users to save data for longer periods of time, since extensions have different permissions than a normal web app.
Perhaps there's even a way to sync user settings (and data).
Might give the user a creative or even relaxed state of mind. Could be useful to replace the stale gray background.
Perhaps make this an optional feature.
Perhaps check if the we have the situation in described in the title. Then only use the scroll prevention method if we have less than a screen worth of content.
Or make it calculate the correct height.
When opening a file at the bottom of a long list of files and going back to the menu again, the list scrolls back up to the top.
This makes it annoying when searching for a specific file and you have to scroll down to the bottom every time.
By getting back to the same scroll position in the main menu automatically, UX would be improved.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.