-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from marcelinombb/dev
Reestruturações na criação de plugin e correções
- Loading branch information
Showing
50 changed files
with
1,437 additions
and
1,099 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type ExitusEditor from '@src/ExitusEditor' | ||
import { type AnyExtension } from '@tiptap/core' | ||
|
||
export interface PluginInterface { | ||
init(): void | ||
destroy(): void | ||
} | ||
|
||
export class Plugin implements PluginInterface { | ||
constructor(readonly editor: ExitusEditor) {} | ||
init(): void { | ||
throw new Error('init must be implemented in the derived class') | ||
} | ||
destroy(): void {} | ||
static get pluginName(): string { | ||
throw new Error('pluginName must be implemented in the derived class') | ||
} | ||
static get requires(): AnyExtension[] { | ||
return [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import { type Toolbar } from './Toolbar' | ||
|
||
export interface Tool { | ||
name: string | ||
on(): void | ||
off(): void | ||
update(toolbar: Toolbar): void | ||
render(): HTMLElement | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.