Skip to content

Editor

tsx
import { createRoot, Editor } from '@kubb/react'

const root = createRoot()

const Component = () => {
  return (
    <Editor language="text">
      export const test = 2
    </Editor>
  )
}

root.render(<Component />)

return root.output
typescript
export const test = 2

API

PropertyDescriptionTypeDefault
languageName of the language used.typescript' | 'text' | string-
childrenKubbNode | undefined-

Released under the MIT License.