to:sync
This commit is contained in:
parent
6f8568cdaa
commit
3535839f16
@ -109,7 +109,7 @@ export class MyBiz {
|
||||
|
||||
//如果是第一行
|
||||
let previousSibling = curP.previousSibling
|
||||
console.log(curP, previousSibling === undefined, previousSibling.id === undefined)
|
||||
// console.log(curP, previousSibling === undefined, previousSibling.id === undefined)
|
||||
if (previousSibling === undefined || previousSibling.id === undefined) {
|
||||
//显示用户的输入内容
|
||||
window.myEdit.ctx.showTestText()
|
||||
@ -142,6 +142,7 @@ export class MyBiz {
|
||||
}
|
||||
|
||||
//收起选区到一个点,光标落在一个可编辑元素上
|
||||
console.log("previousSibling: ",previousSibling);
|
||||
window.getSelection().setPosition(previousSibling, 1);
|
||||
}
|
||||
|
||||
@ -186,7 +187,7 @@ export class MyBiz {
|
||||
newParagraph.setAttribute("id", uuid)
|
||||
newParagraph.setAttribute("data-order", rowNo)
|
||||
newParagraph.onkeyup = window.myEdit.eventListener.KeydownListener
|
||||
// newParagraph.innerHTML = "<br>"
|
||||
newParagraph.innerHTML = "<br>"
|
||||
window.myEdit.ctx.MyRoot.appendChild(newParagraph)
|
||||
window.myEdit.ctx.MyDocMap.set(rowNo, new MyMapItem(uuid))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user