Skip to content

Commit

Permalink
🎨 fix #669
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Aug 1, 2020
1 parent 7d710bb commit ea039e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@

### v3.4.2 / 2020-08-xx

* [669](https://github.com/Vanessa219/vditor/issues/669) links problem(Wysiwyg) `改进功能`
* [667](https://github.com/Vanessa219/vditor/issues/667) lists (SV) `修复缺陷`
* [446](https://github.com/Vanessa219/vditor/issues/446) 改进复制粘贴链接体验 `引入特性`

Expand Down
2 changes: 1 addition & 1 deletion demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ window.vditor = new Vditor('vditor', {
// _lutePath: `http://192.168.0.107:9090/lute.min.js?${new Date().getTime()}`,
_lutePath: 'src/js/lute/lute.min.js',
toolbar,
mode: 'sv',
mode: 'wysiwyg',
height: window.innerHeight + 100,
outline: true,
debugger: true,
Expand Down
5 changes: 5 additions & 0 deletions src/ts/wysiwyg/toolbarEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ export const toolbarEvent = (vditor: IVditor, actionBtn: Element, event: Event)
range.surroundContents(node);
range.insertNode(node);
setSelectionFocus(range);
genAPopover(vditor, node);
const textInputElements = vditor.wysiwyg.popover.querySelectorAll("input");
textInputElements[0].value = node.innerText;
textInputElements[1].focus();
useHighlight = false;
}
} else if (commandName === "table") {
let tableHTML = `<table data-block="0"><thead><tr><th>col1<wbr></th><th>col2</th><th>col3</th></tr></thead><tbody><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></tbody></table>`;
Expand Down

0 comments on commit ea039e0

Please sign in to comment.