mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 20:00:17 +01:00
This commit is contained in:
parent
a7a69241d9
commit
94f33d6711
1 changed files with 16 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ import {saveScroll} from "../protyle/scroll/saveScroll";
|
|||
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||
import {Files} from "../layout/dock/Files";
|
||||
import {ProtyleMethod} from "./ProtyleMethod";
|
||||
import {openEmojiPanel} from "../emoji";
|
||||
|
||||
let openTab;
|
||||
let openWindow;
|
||||
|
|
@ -305,6 +306,19 @@ export const expandDocTree = async (options: {
|
|||
file.getLeaf(liElement, notebookId);
|
||||
};
|
||||
|
||||
const openEmoji = (options: {
|
||||
position: IPosition,
|
||||
selectedCB?: (emoji: string) => void,
|
||||
dynamicIconURL?: string
|
||||
}) => {
|
||||
let dynamicImgElement: HTMLImageElement;
|
||||
if (options.dynamicIconURL) {
|
||||
dynamicImgElement = document.createElement("img");
|
||||
dynamicImgElement.src = options.dynamicIconURL;
|
||||
}
|
||||
openEmojiPanel("", "av", options.position, options.selectedCB, dynamicImgElement);
|
||||
};
|
||||
|
||||
export const API = {
|
||||
adaptHotkey: updateHotkeyTip,
|
||||
confirm: confirmDialog,
|
||||
|
|
@ -339,5 +353,6 @@ export const API = {
|
|||
openAttributePanel,
|
||||
saveLayout,
|
||||
globalCommand,
|
||||
expandDocTree
|
||||
expandDocTree,
|
||||
openEmoji
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue