[FR] Format on paste
Benature opened this issue · 1 comments
Benature commented
/**
* Triggered when the editor receives a paste event.
* Check for `evt.defaultPrevented` before attempting to handle this event, and return if it has been already handled.
* Use `evt.preventDefault()` to indicate that you've handled the event.
* @public
*/
on(name: 'editor-paste', callback: (evt: ClipboardEvent, editor: Editor, info: MarkdownView | MarkdownFileInfo) => any, ctx?: any): EventRef;
Benature commented
This feature only works on notes that contain metadata tfFormatOnPaste
for example:
---
tfFormatOnPaste: ['lowercase', 'convert-bullet-list', 'easy-typing-format']
---
easy-typing-format
called function formatSelectionOrCurLine(editor, view)
of Easy Typing