cccccccccccccccc

This commit is contained in:
aote777 2021-11-23 15:20:50 +08:00
parent 31d3abfa62
commit 3d69874d65
1 changed files with 3 additions and 3 deletions

View File

@ -100,11 +100,10 @@
// 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) console.log('当前的配置项',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
// 高亮一下代码
textarea.parentNode.insertBefore(newDiv, textarea.nextSibling) textarea.parentNode.insertBefore(newDiv, textarea.nextSibling)
textarea.style.display = 'none' textarea.style.display = 'none'
}) })
@ -123,7 +122,8 @@
}) })
}) })
.then(() => { .then(() => {
hljs.initHighlightingOnLoad() hljs.highlightAll()
// hljs.initHighlightingOnLoad()
}) })
</script> </script>
</body> </body>