mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-06 04:40:15 +01:00
This commit is contained in:
parent
41d03c92b9
commit
0081f4f793
2 changed files with 5 additions and 3 deletions
|
|
@ -565,11 +565,13 @@ ${padHTML}
|
|||
});
|
||||
}
|
||||
|
||||
public render(protyle: IProtyle, update = false) {
|
||||
public render(protyle: IProtyle, update = false, nodeElement?: Element | false) {
|
||||
/// #if !MOBILE
|
||||
let range: Range;
|
||||
let blockElement: Element;
|
||||
if (getSelection().rangeCount > 0) {
|
||||
if (nodeElement) {
|
||||
blockElement = nodeElement
|
||||
} else if (getSelection().rangeCount > 0) {
|
||||
range = getSelection().getRangeAt(0);
|
||||
if (!protyle.wysiwyg.element.isEqualNode(range.startContainer) && !protyle.wysiwyg.element.contains(range.startContainer)) {
|
||||
if (protyle.element.id === "searchPreview") {
|
||||
|
|
|
|||
|
|
@ -1980,7 +1980,7 @@ export class WYSIWYG {
|
|||
});
|
||||
// 面包屑定位,需至于前,否则 return 的元素就无法进行面包屑定位
|
||||
if (protyle.options.render.breadcrumb) {
|
||||
protyle.breadcrumb.render(protyle);
|
||||
protyle.breadcrumb.render(protyle, false, hasClosestBlock(event.target));
|
||||
}
|
||||
const range = getEditorRange(this.element);
|
||||
// 需放在嵌入块之前,否则嵌入块内的引用、链接、pdf 双链无法点击打开 https://ld246.com/article/1630479789513
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue