Skip to content

LexicalEditor — usage examples

LexicalEditor ships as six pre-compiled, per-framework packages from a single .rozie source — install only the one for your framework (no Rozie toolchain, no build-time compile step). Each carries its engine + framework peers as peer dependencies, so you control their versions. The snippets below are the same idiomatic consumption code shown in each package's README; switch the tab to your framework.

Usage

tsx
import { LexicalEditor } from '@rozie-ui/lexical-react';

export function Editor() {
  return <LexicalEditor ariaLabel="Post body" />;
}
vue
<script setup lang="ts">
import LexicalEditor from '@rozie-ui/lexical-vue';
</script>

<template>
  <LexicalEditor aria-label="Post body" />
</template>
svelte
<script lang="ts">
  import LexicalEditor from '@rozie-ui/lexical-svelte';
</script>

<LexicalEditor ariaLabel="Post body" />
ts
import { Component } from '@angular/core';
import { LexicalEditor } from '@rozie-ui/lexical-angular';

@Component({
  selector: 'app-editor',
  standalone: true,
  imports: [LexicalEditor],
  template: `<LexicalEditor ariaLabel="Post body" />`,
})
export class EditorComponent {}
tsx
import { LexicalEditor } from '@rozie-ui/lexical-solid';

export function Editor() {
  return <LexicalEditor ariaLabel="Post body" />;
}

See also

Pre-v1.0 — internal monorepo.