-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (47 loc) · 1.81 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<script type="text/javascript" src="https://codeassign.github.io/markjax/dist/markjax.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css">
<style>
body {
padding: 80px;
}
</style>
</head>
<body>
<textarea class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
## CodeAssign Editor
Is a [SimpleMDE](https://simplemde.com/) Markdown editor powerd by [MarkJax](http://markjax.codeassign.com/) parser.
To use it you need to include both *SimpleMDE* and *MarkJax* into your page:
```
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<script type="text/javascript" src="https://codeassign.github.io/markjax/dist/markjax.min.js"></script>
```
and now when you create new `SimpleMDE` object you need to specify custom `previewRender` function which uses *MarkJax*:
```
var simplemde = new SimpleMDE({
previewRender: markjax
});
```
And of course you can still write and use LaTeX:
$$\sum_{n=1}^{\infty} 2^{-n} = 1$$
</textarea>
<script>
var simplemde = new SimpleMDE({
previewRender: function(plainText, preview) {
setTimeout(function() {
markjax(plainText, preview);
}, 50);
return preview.innerHTML;
},
spellChecker: false,
indentWithTabs: false
});
SimpleMDE.toggleSideBySide(simplemde);
</script>
</body>
</html>