mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 07:48:49 +01:00
🎨 加入针对内容块的人工智能辅助支持 https://github.com/siyuan-note/siyuan/issues/7566
This commit is contained in:
parent
4c19f3a3d3
commit
20589471aa
2 changed files with 3 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ import {isMobile} from "../util/functions";
|
|||
|
||||
export const fillContent = (protyle:IProtyle, data:string, elements:Element[]) => {
|
||||
setLastNodeRange(elements[elements.length - 1], protyle.toolbar.range);
|
||||
protyle.toolbar.range.collapse(true);
|
||||
insertHTML(data, protyle, true, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -435,7 +435,6 @@ export class Gutter {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
AIActions(selectsElement, protyle);
|
||||
if (!isList && !protyle.disabled) {
|
||||
const turnIntoSubmenu: IMenu[] = [];
|
||||
if (isContinue) {
|
||||
|
|
@ -571,6 +570,7 @@ export class Gutter {
|
|||
}).element);
|
||||
}
|
||||
}
|
||||
AIActions(selectsElement, protyle);
|
||||
const copyMenu: IMenu[] = [{
|
||||
label: window.siyuan.languages.copy,
|
||||
accelerator: "⌘C",
|
||||
|
|
@ -738,7 +738,6 @@ export class Gutter {
|
|||
hideElements(["select"], protyle);
|
||||
nodeElement.classList.add("protyle-wysiwyg--select");
|
||||
countBlockWord([id], protyle.block.rootID);
|
||||
AIActions([nodeElement], protyle);
|
||||
// "heading1-6", "list", "ordered-list", "check", "quote", "code", "table", "line", "math", "paragraph"
|
||||
if (type === "NodeParagraph" && !protyle.disabled) {
|
||||
turnIntoSubmenu.push(this.turnsIntoOne({
|
||||
|
|
@ -978,6 +977,7 @@ export class Gutter {
|
|||
submenu: turnIntoSubmenu
|
||||
}).element);
|
||||
}
|
||||
AIActions([nodeElement], protyle);
|
||||
const copyMenu = (copySubMenu(id, true, nodeElement) as IMenu[]).concat([{
|
||||
label: window.siyuan.languages.copy,
|
||||
accelerator: "⌘C",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue