mirror of
https://github.com/lorens-osman-dev/double-row-toolbar.git
synced 2026-07-22 12:30:23 +00:00
25 lines
545 B
TypeScript
25 lines
545 B
TypeScript
import { Editor, MarkdownView, Plugin, Platform, Notice } from 'obsidian';
|
|
|
|
export default class DoubleRowToolbarPlugin extends Plugin {
|
|
async onload() {
|
|
|
|
if (Platform.isDesktop) {
|
|
new Notice("'Double row toolbar' plugin is not supported on desktop devices.");
|
|
return;
|
|
}
|
|
|
|
this.addCommand({
|
|
id: "delete-current-line",
|
|
name: "Delete current line",
|
|
icon: "scissors-line-dashed",
|
|
editorCallback: (editor: Editor, view: MarkdownView) => {
|
|
editor.exec("deleteLine");
|
|
editor.focus();
|
|
}
|
|
});
|
|
}
|
|
|
|
onunload() { }
|
|
}
|
|
|
|
|