From b3798b73293f8332848be7a519290fc3ba39d716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 18 Nov 2020 14:37:35 +0100 Subject: [PATCH] add prism-typescript --- docs/src/docPages/guide/working-with-typescript.md | 4 ++-- docs/src/main.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/docPages/guide/working-with-typescript.md b/docs/src/docPages/guide/working-with-typescript.md index a7aed418..0e4a1a01 100644 --- a/docs/src/docPages/guide/working-with-typescript.md +++ b/docs/src/docPages/guide/working-with-typescript.md @@ -14,7 +14,7 @@ If you’re using TypeScript in your project and want to extend tiptap, there ar ## Options type To extend or create default options for an extension, you’ll need to define a custom type, here is an example: -```js +```ts import { Extension } from '@tiptap/core' export interface CustomExtensionOptions { @@ -31,7 +31,7 @@ const CustomExtension = Extension.create({ ## Command type The core package also exports a `Command` type, which needs to be added to all commands that you specify in your code. Here is an example: -```js +```ts import { Command, Extension } from '@tiptap/core' const CustomExtension = Extension.create({ diff --git a/docs/src/main.js b/docs/src/main.js index c1966e16..2257fc1d 100644 --- a/docs/src/main.js +++ b/docs/src/main.js @@ -1,6 +1,7 @@ // eslint-disable-next-line import Prism from 'prismjs' import 'prismjs/components/prism-jsx.js' +import 'prismjs/components/prism-typescript.js' import 'prismjs/components/prism-scss.js' import PortalVue from 'portal-vue' import App from '~/layouts/App'