Skip to content

Commit

Permalink
Add extra typing tests for previewRender
Browse files Browse the repository at this point in the history
  • Loading branch information
Ionaru committed Aug 20, 2022
1 parent 4a73c91 commit 84aafdd
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions types/easymde-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,21 @@ new EasyMDE({

new EasyMDE({
direction: 'ltr',
})
});

new EasyMDE({
direction: 'rtl',
})
});

new EasyMDE({
previewRender: (plainText: string) => {
return '<pre>' + plainText + '</pre>';
}
});

new EasyMDE({
previewRender: (plainText: string, preview) => {
preview.innerHTML = '<pre>' + plainText + '</pre>';
return null;
}
});

0 comments on commit 84aafdd

Please sign in to comment.