mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-07 09:18:49 +01:00
This commit is contained in:
parent
2f0a68e968
commit
0bd35a97c1
1 changed files with 6 additions and 3 deletions
|
|
@ -208,7 +208,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
|
|||
if (textJSON.length === 1 && textJSON[0].length === 1) {
|
||||
updateCellsValue(protyle, blockElement as HTMLElement, text, cellElements, columns, html);
|
||||
} else {
|
||||
let currentRowElement:Element;
|
||||
let currentRowElement: Element;
|
||||
const firstColIndex = cellElements[0].getAttribute("data-col-id");
|
||||
textJSON.forEach((rowValue, rowIndex) => {
|
||||
if (!currentRowElement) {
|
||||
|
|
@ -354,10 +354,13 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
// 表格内选中数学公式 https://ld246.com/article/1631708573504
|
||||
inlineMathElement.remove();
|
||||
} else if (range.startContainer.nodeType === 3 && range.startContainer.parentElement.getAttribute("data-type")?.indexOf("block-ref") > -1) {
|
||||
// ref 选中处理 https://ld246.com/article/1629214377537
|
||||
range.startContainer.parentElement.remove();
|
||||
// 选中 ref**bbb** 后 alt+[
|
||||
range.deleteContents();
|
||||
// https://github.com/siyuan-note/siyuan/issues/14035
|
||||
if (range.startContainer.nodeType !== 3 && range.startContainer.textContent === "") {
|
||||
// ref 选中处理 https://ld246.com/article/1629214377537
|
||||
(range.startContainer as HTMLElement).remove();
|
||||
}
|
||||
} else {
|
||||
range.deleteContents();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue