mirror of
https://github.com/anareaty/html-checkboxes.git
synced 2026-07-22 05:37:43 +00:00
Update main.ts
This commit is contained in:
parent
126b42dbd8
commit
99cc316e7b
1 changed files with 2 additions and 1 deletions
3
main.ts
3
main.ts
|
|
@ -289,7 +289,8 @@ export default class HTMLCheckboxPlugin extends Plugin {
|
||||||
async fixCheckboxIds(editor: Editor, inCanvas?: Element | null | undefined, pasteContent?: string) {
|
async fixCheckboxIds(editor: Editor, inCanvas?: Element | null | undefined, pasteContent?: string) {
|
||||||
let lastLine = editor.lastLine()
|
let lastLine = editor.lastLine()
|
||||||
let lastLineLength = editor.getLine(lastLine).length
|
let lastLineLength = editor.getLine(lastLine).length
|
||||||
let editorContent = editor.getRange({line:0, ch: 0}, {line:lastLine, ch: lastLineLength})
|
editor.setSelection({line:0, ch: 0}, {line:lastLine, ch: lastLineLength})
|
||||||
|
let editorContent = editor.getSelection()
|
||||||
let re = /(id="hc-)([^"]+)(\")/g;
|
let re = /(id="hc-)([^"]+)(\")/g;
|
||||||
let cursor = editor.getCursor()
|
let cursor = editor.getCursor()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue