Skip to content
markdown preview using marked, highlight.js, mermaid, node-emoji and live reload
CSS JavaScript Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
assets
docs
package
src
themes
.compilerc
.editorconfig
.eslintrc
.gitignore
.jshintrc
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
package-lock.json
package.json

README.md

mdp

markdown preview using marked, highlight.js, mermaid, node-emoji and live reload

https://ericlink.github.io/mdp/

markdown.png

mermaid.png

features

highlight.js

syntax highlighting https://highlightjs.org/

mermaid diagrams

https://mermaidjs.github.io/

node-emoji

https://github.com/omnidan/node-emoji

supported emoji

marked markdown parsing

github flavored markdown

https://marked.js.org/

https://github.com/markedjs/marked

example.md

keys

Open as HTML ⌘K

Edit Markdown ⌘E

Zoom - zoom in ⌘+, zoom out ⌘-, actual size ⌘0

macOS

full screen support

dark mode window

command line

put mdp.app/Contents/Resources/app/package/mdp script in your path

logs

on Linux - ~/.config/<app name>/log.log

on macOS - ~/Library/Logs/<app name>/log.log

on Windows - %USERPROFILE%\AppData\Roaming\<app name>\log.log

dev notes

  1. npm install
  2. npm run dev

test and publish

  1. npm run dev & - run in background to test open-file with subsequent open
  2. npm run dev-noarg - tests launch with no arg, app starts with no window
  3. ./node_modules/.bin/electron ./src/main.js ./README.md
  4. npm run dev-publish
  5. open from finder once packaged
  6. open from mdp shell script once packaged
  7. tail -f ~/Library/Logs/mdp/log.log

upstream repo is git clone https://github.com/ericlink/electron-forge-webapp-template.git

package

  1. npm install
  2. npm run package
  3. npm run make && npm run publish

todo

features

  • print style sheets

  • get working with highlight.js themes

  • get working with marked themes

  • get working with mermaid themes / css (mermaid-cli -C)

  • keep scroll position on reload

  • vim keymappings

  • recent documents app.addRecentDocument('/Users/USERNAME/Desktop/work.type') app.clearRecentDocuments()

  • issues and site linked in about

  • autosave sometimes doesn't refresh (file watcher issue?)

  • zoom by window?

package and install

  • installer - install command line script into /usr/local/bin
  • sign app to enable auto updater using git releases

tech

  • upgrade packages
  • get electron-forge start working (not passing arg; detect mode and default arg to readme?)
  • load modules more efficiently?
  • webpack?
  • extendInfo any - The extra entries for Info.plist.

done

  • preferences to set editor, e.g. var executablePath = "mvim";
  • use tmp file for html
  • fixup markdown inline images to use base path of .md file they are in
  • emoji support
  • cmd+e to edit current markdown in system editor
  • open url only add listener once, not every reload
  • export menu (html, open in browser)
  • open links in os browser
  • expand cmd args to absolute path
  • fix up js
  • window menu
  • close window key
  • get working from file associated in finder
  • get working opening multiple from command line
  • get working as cmd line
  • get working as packaged
  • github release using electron-forge
  • keep scroll position on reload
  • move poc into app (works using dev command line)
You can’t perform that action at this time.