An open-source, browser-based plain text editor built entirely with HTML, CSS and JavaScript:
Browserpad will always be a plaintext editor: no Markdown/HTML preview, no WYSIWIG, no rich text editing. Think a browser-based notepad with a few extra text manipulation features. The aim of this guiding principle is to prevent feature creep and keep the tool focused, the Unix way: do one thing, and do it well.
- Browserpad started
up
as a very simple browser notepad entirely contained in a data URI:
data:text/html,<textarea autofocus style='width:100%;height:100%;border:none;outline:none'/>
(try copying and pasting that to your browser address bar and pressing enter). This concept was originally decribed by @jjperezaguinaga on his 4 Dec 2012 post "One line browser notepad".- Actually, it appears that it had been previously uncovered by @tabatkins, as evidenced by this 29 Jan 2012 tweet by @paulirish.
- This 9 December 2011 Hacker News comment by @bytex64 mentions a talk about HTML5 where this was presented
- @tabatkins and @bytex64 might have further info. It would be nice to get this documented.
- The data URI approach was neat, but impractical, and was eventually abandoned in favor of the regular HTML file approach.
- Browserpad is heavily inspired by the existing (but proprietary) online plaintext editors:
- In terms of features, Browserpad aims to match most of the text manipulation operations listed/implemented in:
- textmechanic.com
- textop.us (defunct)
- wikipedia
Note: As a rule of thumb, Browserpad aims to support only editing operations that are generic and content-agnostic. This means it won't implement any context-sensitive functions that depend on the semantic meaning of the text, such as bracket matching, code linting, etc.
- support tab key
- auto-save using
localStorage
(see here) - show statistics (lines/words/characters)
- indent-deindent (with
Tab
/Shift+Tab
) - keep selection visible (greyed out) when unfocused (see here)
- use contents of first line (or filename, if defined) as title (see here)
- menu entries (menu icon: ≡)
- contrast (normal / night mode). (see icon here)
- permalink / share (via data url)
- save to a file
(using the download attribute of the
a
element; browser support for the download attribute)- save as (custom filename).
- load from a file on disk (based on this implementation)
- show visual guide at: 0/72/80 CPL (radio buttons)
- soft-wrap lines at specified CPL (need to wait for FF 36)
- highlight current line
- text operations (on whole text or selection):
- case change (lower/upper/title)
- search & replace
- match highlight, emphasize current match, and cycling with F3
- one-by-one or bulk replace
- regex support
- wrap-unwrap lines
- smart tabs-to-spaces conversion
- sync across machines (see issue #5)
- split window (different views of the same document (or maybe two separate documents?...)
- More inspiration from: ACE, CodeMirror, EditArea, more...
Browserpad is open source software released under the ISC License.