refactor: disable builtin paste handler

pull/147/merge
moonrailgun 1 year ago
parent b72e0d5f46
commit b3015401b2

@ -36,15 +36,17 @@ export class ClipboardHelper {
}
get builtinHandlers(): ChatInputPasteHandler[] {
return [
{
name: 'pasteUrl',
label: t('转为Url富文本'),
match: (e) => e.clipboardData.getData('text/plain').startsWith('http'),
handler: (data, { applyMessage }) => {
applyMessage(getMessageTextDecorators().url(data.text));
},
const pasteUrl: ChatInputPasteHandler = {
name: 'pasteUrl',
label: t('转为Url富文本'),
match: (e) => e.clipboardData.getData('text/plain').startsWith('http'),
handler: (data, { applyMessage }) => {
applyMessage(getMessageTextDecorators().url(data.text));
},
};
return [
// pasteUrl
];
}

Loading…
Cancel
Save