mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
5c0a1ae31a
commit
219d714f49
3 changed files with 5 additions and 4 deletions
|
|
@ -162,8 +162,7 @@ export const initKeyboardToolbar = () => {
|
||||||
protyle.toolbar.setInlineMark(protyle, type, "toolbar");
|
protyle.toolbar.setInlineMark(protyle, type, "toolbar");
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
// block element
|
// TODO block element
|
||||||
|
|
||||||
if (type === "up") {
|
if (type === "up") {
|
||||||
moveToUp(protyle, nodeElement, range);
|
moveToUp(protyle, nodeElement, range);
|
||||||
focusByRange(range);
|
focusByRange(range);
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
|
||||||
value: "{{",
|
value: "{{",
|
||||||
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSQL"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.blockEmbed}</span><span class="b3-list-item__meta">{{</span></div>`,
|
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSQL"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.blockEmbed}</span><span class="b3-list-item__meta">{{</span></div>`,
|
||||||
}, {
|
}, {
|
||||||
filter: ["AI Chat"],
|
filter: ["ai chat"],
|
||||||
value: Constants.ZWSP + 5,
|
value: Constants.ZWSP + 5,
|
||||||
html: '<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSparkles"></use></svg><span class="b3-list-item__text">AI Chat</span></div>',
|
html: '<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSparkles"></use></svg><span class="b3-list-item__text">AI Chat</span></div>',
|
||||||
},{
|
},{
|
||||||
|
|
|
||||||
|
|
@ -569,9 +569,11 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
|
||||||
fetchPost("/api/ai/chatGPT", {
|
fetchPost("/api/ai/chatGPT", {
|
||||||
msg: inputElement.value,
|
msg: inputElement.value,
|
||||||
}, (response) => {
|
}, (response) => {
|
||||||
insertHTML(response.data, protyle, true);
|
|
||||||
progressLoading({code: 2, cmd:"", data:"", msg:"", sid:""});
|
progressLoading({code: 2, cmd:"", data:"", msg:"", sid:""});
|
||||||
dialog.destroy();
|
dialog.destroy();
|
||||||
|
focusByRange(protyle.toolbar.range);
|
||||||
|
insertHTML(`${inputElement.value}
|
||||||
|
* 1`, protyle, true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue