1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 07:16:14 +02:00

refactor(frontend): src -> anchorElement

This commit is contained in:
syuilo
2025-05-22 12:24:52 +09:00
parent aa55663ef7
commit 74c857e23d
13 changed files with 61 additions and 61 deletions

View File

@@ -4,20 +4,20 @@
*/
import { nextTick } from 'vue';
import { MFM_TAGS } from '@@/js/const.js';
import type { Ref } from 'vue';
import type { MenuItem } from '@/types/menu.js';
import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
import { MFM_TAGS } from '@@/js/const.js';
import type { MenuItem } from '@/types/menu.js';
/**
* MFMの装飾のリストを表示する
*/
export function mfmFunctionPicker(src: HTMLElement | EventTarget | null, textArea: HTMLInputElement | HTMLTextAreaElement, textRef: Ref<string>) {
export function mfmFunctionPicker(anchorElement: HTMLElement | EventTarget | null, textArea: HTMLInputElement | HTMLTextAreaElement, textRef: Ref<string>) {
os.popupMenu([{
text: i18n.ts.addMfmFunction,
type: 'label',
}, ...getFunctionList(textArea, textRef)], src);
}, ...getFunctionList(textArea, textRef)], anchorElement);
}
function getFunctionList(textArea: HTMLInputElement | HTMLTextAreaElement, textRef: Ref<string>): MenuItem[] {