add prism-typescript
This commit is contained in:
@@ -14,7 +14,7 @@ If you’re using TypeScript in your project and want to extend tiptap, there ar
|
|||||||
## Options type
|
## Options type
|
||||||
To extend or create default options for an extension, you’ll need to define a custom type, here is an example:
|
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'
|
import { Extension } from '@tiptap/core'
|
||||||
|
|
||||||
export interface CustomExtensionOptions {
|
export interface CustomExtensionOptions {
|
||||||
@@ -31,7 +31,7 @@ const CustomExtension = Extension.create({
|
|||||||
## Command type
|
## 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:
|
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'
|
import { Command, Extension } from '@tiptap/core'
|
||||||
|
|
||||||
const CustomExtension = Extension.create({
|
const CustomExtension = Extension.create({
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
import Prism from 'prismjs'
|
import Prism from 'prismjs'
|
||||||
import 'prismjs/components/prism-jsx.js'
|
import 'prismjs/components/prism-jsx.js'
|
||||||
|
import 'prismjs/components/prism-typescript.js'
|
||||||
import 'prismjs/components/prism-scss.js'
|
import 'prismjs/components/prism-scss.js'
|
||||||
import PortalVue from 'portal-vue'
|
import PortalVue from 'portal-vue'
|
||||||
import App from '~/layouts/App'
|
import App from '~/layouts/App'
|
||||||
|
|||||||
Reference in New Issue
Block a user