Repository navigation
0.3.0 - Framework wrappers
·
32 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Stilo now ships wrappers for React, Vue and Svelte, in the same package: npm install stilo-editor and import from stilo-editor/react, stilo-editor/vue or stilo-editor/svelte.
Added
- React wrapper,
stilo-editor/react: theStiloEditorcomponent with the default toolbar and theuseStiloEditorhook for a UI of your own. React 18 and 19, server-side rendering, marked'use client'for React Server Components (Next.js App Router). React guide - Vue wrapper,
stilo-editor/vue: theStiloEditorcomponent with the default toolbar and theuseStiloEditorcomposable for a UI of your own. Vue 3.4 and later, server-side rendering. Vue guide - Svelte wrapper,
stilo-editor/svelte: theStiloEditorcomponent for Svelte 5, withbind:editor, and the actionsstiloEditorWithUI(default toolbar) andstiloEditor(a UI of your own) for Svelte 4 and 5, also fromstilo-editor/svelte/action. Server-side rendering. Svelte guide - A guide for each framework, React, Vue and Svelte: every task with code in the idiom of the framework, from install to a UI of your own.
Changed
- The editable area has a small default padding (
12px 16px) and height (min-height: 6em), so an editor without styles of your own no longer has its text against the toolbar. Any rule of yours replaces them; if you put the padding on the container instead, set.stilo-content { padding: 0 }.
Fixed
- A read-only editor (
editable: false) can no longer be changed through the toolbar or the commands: a command that would change the content returnsfalse, also from.can(), and the toolbar disables its buttons, except find.setEditablenow emitstransaction, so the toolbar and your own buttons follow the switch. - After select all in a large document the toolbar refreshes about 10 times faster, so the selection shows sooner (50,000 paragraphs: 11 s → 1 s).
Full changelog: v0.2.1...v0.3.0