Skip to content

Commit

Permalink
Add useful methods from CodeMirrorExt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Midgley committed May 8, 2020
1 parent 6035675 commit 170cb87
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apps/editor/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,19 @@ declare namespace toastui {
public styleToSelectedCells(onStyle: SquireExt, options?: object): void;
}

interface MarkdownRange {
from: CodeMirror.Position;
to: CodeMirror.Position;
collapsed: boolean;
}

class CodeMirrorExt {
getCurrentRange(): MarkdownRange;
getEditor(): CodeMirrorType;
}

// @TODO: change toastMark type definition to @toast-ui/toastmark type file through importing
class MarkdownEditor {
class MarkdownEditor extends CodeMirrorExt {
static factory(
el: HTMLElement,
eventManager: EventManager,
Expand Down

0 comments on commit 170cb87

Please sign in to comment.