cccccccccccccccc
This commit is contained in:
parent
623265507c
commit
203ef204e2
15
demo.html
15
demo.html
|
|
@ -10,13 +10,8 @@
|
||||||
<textarea class="md-content">
|
<textarea class="md-content">
|
||||||
# 你好
|
# 你好
|
||||||
* 哈哈
|
* 哈哈
|
||||||
|
|
||||||
| h1 | h2 | h3 |
|
|
||||||
|:------|:-------:|--------:|
|
|
||||||
| 100 | [a][1] | ![b][2] |
|
|
||||||
| *foo* | **bar** | ~~baz~~ |
|
|
||||||
</textarea>
|
</textarea>
|
||||||
<textarea rows="30" cols="50" class="md-content">
|
<textarea class="md-content">
|
||||||
```
|
```
|
||||||
<div>??--->>><<<</div>
|
<div>??--->>><<<</div>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
|
@ -28,6 +23,11 @@
|
||||||
let a=88888
|
let a=88888
|
||||||
const b=999
|
const b=999
|
||||||
```
|
```
|
||||||
|
|
||||||
|
| h1 | h2 | h3 |
|
||||||
|
|:------|:-------:|--------:|
|
||||||
|
| 100 | [a][1] | ![b][2] |
|
||||||
|
| *foo* | **bar** | ~~baz~~ |
|
||||||
</textarea>
|
</textarea>
|
||||||
<script>
|
<script>
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
@ -90,11 +90,12 @@
|
||||||
disableforced4spacesindentedsublist: true,
|
disableforced4spacesindentedsublist: true,
|
||||||
ghCodeBlocks: true,
|
ghCodeBlocks: true,
|
||||||
})
|
})
|
||||||
// convert.setFlavor('github')
|
convert.setFlavor('github')
|
||||||
document.querySelectorAll('.md-content').forEach((textarea) => {
|
document.querySelectorAll('.md-content').forEach((textarea) => {
|
||||||
// console.log('查找到的textarea元素', textarea)
|
// console.log('查找到的textarea元素', textarea)
|
||||||
var text = textarea.value
|
var text = textarea.value
|
||||||
var thisConverterSpecificOptions = convert.getOptions()
|
var thisConverterSpecificOptions = convert.getOptions()
|
||||||
|
console.log('thisConverterSpecificOptions',thisConverterSpecificOptions)
|
||||||
var html = convert.makeHtml(text)
|
var html = convert.makeHtml(text)
|
||||||
var newDiv = document.createElement('div')
|
var newDiv = document.createElement('div')
|
||||||
newDiv.innerHTML = html
|
newDiv.innerHTML = html
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue