Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shellyln/mdne
Markdown Neo Edit - A simple markdown and code editor powered by Markdown-it, Ace and Carlo.
https://github.com/shellyln/mdne
ace carlo editor lisp liyad lsx markdown markdown-it menneu pdf puppeteer
Last synced: about 1 month ago
JSON representation
Markdown Neo Edit - A simple markdown and code editor powered by Markdown-it, Ace and Carlo.
- Host: GitHub
- URL: https://github.com/shellyln/mdne
- Owner: shellyln
- License: other
- Created: 2019-04-21T10:06:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:21:09.000Z (almost 2 years ago)
- Last Synced: 2024-09-18T12:52:03.299Z (about 2 months ago)
- Topics: ace, carlo, editor, lisp, liyad, lsx, markdown, markdown-it, menneu, pdf, puppeteer
- Language: JavaScript
- Homepage:
- Size: 7.33 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# mdne (mdne-classic) - Markdown Neo Edit
### A simple markdown and code editor powered by [Markdown-it](https://github.com/markdown-it/markdown-it), [Ace](https://ace.c9.io/) and [Carlo](https://github.com/GoogleChromeLabs/carlo).
> ## ⚠️ We recommend migrating to [mdne-electron](https://github.com/shellyln/mdne-electron).
> ### [Carlo](https://github.com/GoogleChromeLabs/carlo) is no longer maintained.[![npm](https://img.shields.io/npm/v/mdne.svg)](https://www.npmjs.com/package/mdne)
[![GitHub release](https://img.shields.io/github/release/shellyln/mdne.svg)](https://github.com/shellyln/mdne/releases)
[![.github/workflows/test.yml](https://github.com/shellyln/mdne/workflows/.github/workflows/test.yml/badge.svg)](https://github.com/shellyln/mdne/actions)
[![GitHub forks](https://img.shields.io/github/forks/shellyln/mdne.svg?style=social&label=Fork)](https://github.com/shellyln/mdne/fork)
[![GitHub stars](https://img.shields.io/github/stars/shellyln/mdne.svg?style=social&label=Star)](https://github.com/shellyln/mdne)> **Migrate from `v0.1.x`** (for Windows)
> Please re-run `./make-shortcut.cmd`.## Features
* Live preview of Markdown, HTML, [LSX](https://github.com/shellyln/liyad#what-is-lsx) formats.
* Export Markdown, HTML, LSX into PDF or HTML.
* Code highlighting.
* C#
* CSS
* Dockerfile
* Go
* GraphQL
* HTML
* JavaScript
* JSON
* JSON5
* JSX
* Latex
* Less
* Lisp
* Makefile
* Markdown
* Protobuf
* Python
* R
* Ruby
* Rust
* Sass
* Scss
* Shell script
* SQL
* SVG
* Tex
* TSX
* TypeScript
* XML
* YAML
* Markdown extended syntax
* Many markdown-it plugins are enabled. See [here](https://github.com/shellyln/menneu#features).
* Scripting and value expansion
* See [here](https://github.com/shellyln/menneu#lisp-block-expansion).
* Full screen mode (F11)## Distributions and Integrations
* [mdne-electron](https://github.com/shellyln/mdne-electron)
* Standalone offline desktop app for Windows/Mac/Linux.
* [Electron](https://electronjs.org/) app
* [mdne online](https://github.com/shellyln/mdne-electron)
* Online markdown editor for Chrome/Chromium Edge/Firefox.
* [PWA](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps) (Progressive Web Apps)
* [mdne-sf](https://github.com/shellyln/mdne-sf)
* Edit Salesforce record's field. (browser app)
* Markdown preview Visualforce page example
* [mdne (mdne-classic)](https://github.com/shellyln/mdne)
* Offline desktop app for Google Chrome browser + Node.js.
* *This repository*
* [Carlo](https://github.com/GoogleChromeLabs/carlo) app
* [mdne-for-kintone](https://github.com/shellyln/mdne-for-kintone)
* Edit kintone record's field. (browser app)## Install
### Prerequirements
* Google Chrome (latest)
* Node>=10### Install from NPM
* Linux
```sh
env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=TRUE npm install -g mdne
```* Windows
```cmd
set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=TRUE
npm install -g mdne
```* Chrome OS (Chromebook / Chromebox) Crostini
```sh
env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=TRUE npm install -g mdne
cd
mkdir Desktop
```### Create desktop and 'send to' menu shoorcuts (Windows)
* Download source zip archive from [here](https://github.com/shellyln/mdne/archive/master.zip).
* Extract zip archive and run `make-shortcut.cmd`.### Create desktop icon (Linux)
* `mdne.desktop`
```ini
[Desktop Entry]
Version=1.0
Type=Application
Name=mdne
Comment=mdne
Exec=/home/(user name)/.nvm/versions/node/v??.??.??/bin/node /home/(user name)/.nvm/versions/node/v??.??.??/lib/node_modules/mdne/index.js %F
Icon=/home/(user name)/.nvm/versions/node/v??.??.??/lib/node_modules/mdne/contents/favicon.svg
Path=/home/(user name)/Desktop
Terminal=false
StartupNotify=false
Name[en_US]=mdne
```
> Replace `(user name)` and `??.??.??` .## Run
### Open blank editor:
* Linux, Windows
```sh
mdne
```* Chrome OS (Chromebook / Chromebox) Crostini
```sh
env MDNE_CHROME_CHANNEL_CHROMIUM=true mdne
```
* `MDNE_CHROME_CHANNEL_CHROMIUM=TRUE` can alternatively be written to `.bashrc`.
* Chromium is downloaded locally the first time it run.### Open file:
* Linux, Windows
```sh
mdne README.md
```* Chrome OS (Chromebook / Chromebox) Crostini
```sh
env MDNE_CHROME_CHANNEL_CHROMIUM=true mdne README.md
```
* `MDNE_CHROME_CHANNEL_CHROMIUM=TRUE` can alternatively be written to `.bashrc`.
* Chromium is downloaded locally the first time it run.## CLI
Please use [Ménneu](https://github.com/shellyln/menneu#use-cli) CLI.## Live demo
[https://shellyln.github.io/mdne/](https://shellyln.github.io/mdne/)
#### Open external files from live demo
* Drop a local file into FileDropOpenDialog.
* Set the target URL to a location hash.
* example: [react-dom.development.js](https://shellyln.github.io/mdne/#open.url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Freact-dom%2F16.7.0%2Fumd%2Freact-dom.development.js)
* Fetching files is restricted by the Same-Origin Policy.
* Set zipped data to a location hash.
* example: [hello.md](https://shellyln.github.io/mdne/#filename=hello.md&open.d=eJwtyjEOgCAMBdCdU3zjit6BuLh4CKQdiIWSSkK8vYnxzW_GziLqUajy5FzAnUsTRol2kY6KWAlJicGUuxqaDjYmnA-O_yy5e4TE392iia7uBTWXHe8)
* location hash is generated when `Save` or `SaveAs` commands are done.#### Live demo browser requirements
* Google Chrome: latest
* Firefox: latest#### Live demo restrictions
* Rendering / exporting to PDF is not available.
* Save and SaveAs commands download the file being edited.## ~~Deploying Live demo~~
1. ~~Run `npm run manifest` after edit the `contents/*`.~~
* ~~New `contents/precache-manifest.yyyyy.js` will generate.~~
1. ~~Remove the old `contents/precache-manifest.xxxxx.js`.~~
1. ~~Edit `contents/service-worker.js` to change the reference of `contents/precache-manifest.yyyyy.js` file name.~~
1. ~~Deploy the `contents/*`.~~> See [mdne-electron #build-mdne-online-pwa-app](https://github.com/shellyln/mdne-electron#build-mdne-online-pwa-app).
## Security warning
Exposing of Node side functions by RPC is enabled in preview iframe.
**DON'T OPEN links to untrusted sites from the preview.**
Exposed functions have the ability to list / read / write local files.> ## ⚠️ We recommend migrating to [mdne-electron](https://github.com/shellyln/mdne-electron).
## License
[ISC](https://github.com/shellyln/mdne/blob/master/LICENSE.md)
Copyright (c) 2019 Shellyl_N and Authors.----
## Bundled softwares' license* [Ace](https://github.com/ajaxorg/ace): [license](https://github.com/ajaxorg/ace/blob/master/LICENSE) (BSD-3-Clause)
* [Materialize](https://materializecss.com/): [license](https://github.com/Dogfalo/materialize/blob/v1-dev/LICENSE) (MIT)
* [Normalize.css](https://necolas.github.io/normalize.css/): [license](https://github.com/necolas/normalize.css/blob/master/LICENSE.md) (MIT)
* [React](https://reactjs.org/): [license](https://github.com/facebook/react/blob/master/LICENSE) (MIT)
* [pako](https://github.com/nodeca/pako): [license](https://github.com/nodeca/pako/blob/master/LICENSE) (MIT + ZLIB)
* [dialog-polyfill](https://github.com/GoogleChrome/dialog-polyfill): [license](https://github.com/GoogleChrome/dialog-polyfill/blob/master/LICENSE) (BSD-3-Clause)