Light Code Editor AI Usage
Use this page when generating code editing workflows with @editora/light-code-editor.
Canonical package
@editora/light-code-editor
Quick integration
import { createEditor, SearchExtension, ThemeExtension } from '@editora/light-code-editor';
import '@editora/light-code-editor/dist/light-code-editor.css';
const editor = createEditor(container, {
value: '<h1>Code</h1>',
extensions: [new ThemeExtension(), new SearchExtension()]
});
AI prompt constraints
- Show full mount + cleanup flow (
createEditor+destroy). - Include at least one extension in examples.
- Include search/replace or read-only edge case in production demos.
- Keep snippets runnable in React or vanilla JS without fake APIs.
SaaS example
- Storybook:
https://editora-ecosystem-storybook.netlify.app/?path=/story/ai-light-code-editor-saas-workspace--developer-code-workspace