Small and fast Markdown editor with formatter.
Try here: https://ahuglajbclajep.github.io/minibuf
- format:
ctrl
+d
- save:
ctrl
+s
- download:
ctrl
+q
- darkmode:
ctrl
+e
- hardbreak:
ctrl
+b
- Fast startup with Preact and dynamic-imports
- Working even if offline with a Service Worker generated by Workbox
- Compiling Markdown without blocking input with Comlink
- Differential rendering of the compiled Markdown with morpthdom
- Formatting Markdown while keeping the cursor position with Prettier
- Save and download the Markdown
- Simple Dark Mode with mix-blend-mode and prefers-color-scheme
See also: https://dev.wgao19.cc/sun-moon-blending-mode/ - HardBreak mode, which treats normal line breaks as hard line breaks
The sizes of the bundles measured by the following commands are shown in the table below.
Note that the prefix k
means 1000x and is bigger than the result of ls -lh
, etc.
$ npx -qp pretty-bytes-cli -c 'for f in `find dist -type f`; do echo $f; ls -l $f | awk "{print \$5}" | pretty-bytes; done'
$ npx -qp gzip-size-cli -c 'find dist -type f -exec sh -c "echo {}; gzip-size {}" \;'
filename | size | gzipped | note |
---|---|---|---|
index.html | 622 B | 366 B | |
main.css | 13.8 kB | 3.28 kB | include github-markdown-css |
service-worker.js | 8.11 kB | 3.15 kB | generated by workbox |
main.js | 28.2 kB | 10.8 kB | include preact, comlink, ... |
worker.js | 102 kB | 34.6 kB | include comlink, unified, ... |
1.worker.js | 173 kB | 50.6 kB | only prettier/parser-markdown |
2.worker.js | 479 kB | 145 kB | only prettier/standalone |
805 kB | 248 kB |