@formdown/editor
v0.4.0
Published
Development tool for Formdown syntax with advanced editing features
Readme
@formdown/editor
Web component editor for Formdown syntax.
Installation
npm install @formdown/editorUsage
HTML
<script type="module">
import '@formdown/editor'
</script>
<formdown-editor
content="@name: [text required]"
show-preview="true">
</formdown-editor>JavaScript
import '@formdown/editor'
const editor = document.querySelector('formdown-editor')
editor.content = '@name: [text required]'
editor.showPreview = true
// Listen for content changes
editor.addEventListener('contentChange', (event) => {
console.log('New content:', event.detail.content)
})Properties
content(string) - The Formdown content to editshowPreview(boolean) - Whether to show live previewreadonly(boolean) - Make editor read-only
Events
contentChange- Fired when content changesdetail.content- Updated content
Features
- Syntax highlighting
- Live preview
- Error detection
- Auto-completion hints
- Responsive design
Documentation
For complete documentation, visit the Formdown documentation.
License
MIT
