steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
12.5k stars 1.03k forks source link

How change md style #238

Closed faye1225 closed 7 months ago

faye1225 commented 10 months ago

I'd like to make some adjustments for the editor style. h3, p, blockquote tags, etc. The tech stack I'm using is nextjs+ts+tailwindcss

My code looks like this, but it doesn't work. How should I change it properly?

import { Editor } from 'novel'
import { Node } from '@tiptap/core'

const CustomBlockquote = Node.create({
  name: 'blockquote',
  addOptions() {
    return {
      HTMLAttributes: {
        class: 'border-l-1 '
      }
    }
  }
})

export const NovelEditor = (props: NovelEditorProps) => {
  return (
    <Editor
      defaultValue={props.defaultValue}
      disableLocalStorage
      extensions={[CustomBlockquote]}
    />
  )
}
mansidak commented 9 months ago

Hey @faye1225! Did you ever figure this out? Stuck on somethign similar.

andrewdoro commented 7 months ago

You can now customize each extension https://novel.sh/docs/guides/tailwind/extensions