Ai
1 Star 0 Fork 1

TO1SOURCE/dead simple markdown reader

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
render.js 550 Bytes
一键复制 编辑 原始数据 按行查看 历史
Joelchu 提交于 2020-10-11 16:36 +08:00 . Basic feature working
// taking all the code out from he index.html
// try to com with the main using ipc
const { ipcRenderer } = window.require('electron')
const MarkdownIt = window.require('markdown-it')
const md = new MarkdownIt()
// @TODO add a store to remember the last open file
const target = document.getElementById('rendered-area')
target.innerHTML = '<b>Use the menu to open a file</b>'
ipcRenderer.on('FILE_OPEN', (event, args) => {
console.log('got FILE_OPEN', event, args)
let result = md.render(args)
target.innerHTML = result
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/to1source/dead-simple-markdown-reader.git
git@gitee.com:to1source/dead-simple-markdown-reader.git
to1source
dead-simple-markdown-reader
dead simple markdown reader
master

搜索帮助