Vanessa 2023-03-03 23:16:23 +08:00
parent 5c0a1ae31a
commit 219d714f49
3 changed files with 5 additions and 4 deletions

View file

@ -162,8 +162,7 @@ export const initKeyboardToolbar = () => {
protyle.toolbar.setInlineMark(protyle, type, "toolbar");
return ;
}
// block element
// TODO block element
if (type === "up") {
moveToUp(protyle, nodeElement, range);
focusByRange(range);

View file

@ -37,7 +37,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
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>`,
}, {
filter: ["AI Chat"],
filter: ["ai chat"],
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>',
},{

View file

@ -569,9 +569,11 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
fetchPost("/api/ai/chatGPT", {
msg: inputElement.value,
}, (response) => {
insertHTML(response.data, protyle, true);
progressLoading({code: 2, cmd:"", data:"", msg:"", sid:""});
dialog.destroy();
focusByRange(protyle.toolbar.range);
insertHTML(`${inputElement.value}
* 1`, protyle, true);
});
});
return;