Client javascript support: fixes #18

This commit is contained in:
Igor Shymko
2016-12-05 15:40:52 +02:00
parent 0e2edf3f48
commit 2fc9f06fdf
4 changed files with 28 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
Markdown preview mode
===========================
[![MELPA Stable](http://stable.melpa.org/packages/markdown-preview-mode-badge.svg)](http://stable.melpa.org/#/markdown-preview-mode)
[![MELPA](http://melpa.org/packages/markdown-preview-mode-badge.svg)](http://melpa.org/#/markdown-preview-mode)
@@ -34,6 +35,19 @@ Select your browser from `Value menu`. If it's not there, follow [EmacsWiki: Bro
In order to change preview styling, run `M-x customize-option` -> `markdown-preview-style`
and specify a URL to your favourite markdown css file.
## Client javascript
If you'd like to include additional javascript for the preview, add this to your init:
```lisp
(add-to-list 'markdown-preview-javascript "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML")
```
or, to make it async:
```lisp
(add-to-list 'markdown-preview-javascript '("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML" . async))
```
## Websocket port
Adjustable by `M-x customize-option` -> `markdown-preview-port`.