bugfix: fix the bug that a link in output styled html can not be click

This commit is contained in:
Jocs 2018-02-11 22:49:04 +08:00
parent 88db1f79f7
commit 8a37a18ae9
4 changed files with 7 additions and 3 deletions

View File

@ -6,9 +6,8 @@
- [ ] codeBlock 在 list item 中时list style 问题。
- [ ] 在通过 Aganippe 打开文件时,无法通过右键选择 Aganippe。严重 bug
- [ ] 在通过 Aganippe 打开文件时,通过右键选择软件,但是打开无内容。(严重 bug
- [ ] export html: (3) keyframe 和 font-face 以及 bar-top 的样式都可以删除。(4) 打包后的应用 axios 获取样式有问题。(5) 输出的 html 中 a 标签无法点击
- [ ] export html: (3) keyframe 和 font-face 以及 bar-top 的样式都可以删除。(4) 打包后的应用 axios 获取样式有问题。
- [ ] table: 如果 table 在 selection 后面那么删除cell 的时候,会把整个 row 删除了。(小 bug)
- [ ] 输出的 styled html 中 a 标签无法点击
**菜单**

View File

@ -1,6 +1,6 @@
{
"name": "aganippe",
"version": "0.0.1",
"version": "0.0.2",
"author": "Jocs <luoran1988@126.com>",
"description": "A markdown editor",
"license": "MIT",

View File

@ -115,6 +115,7 @@ class StateRender {
return h(blockSelector, data, block.children.map(child => renderBlock(child)))
} else {
console.log(tokenizer(block.text))
let children = block.text
? tokenizer(block.text).reduce((acc, token) => {
const chunk = this[token.type](h, cursor, block, token)

View File

@ -18,6 +18,9 @@ class ExportHTML {
<title>Aganippe</title>
<style>
${style}
a {
pointer-events: auto;
}
</style>
</head>
<body>
@ -160,6 +163,7 @@ class ExportHTML {
const href = anchor.attr('data-href')
anchor.removeAttr('data-href')
anchor.attr('href', href)
anchor.attr('target', '_blank')
})
}
return $('body').html()