Skip to content

Releases

0.5.2 - Images on touch screens

Choose a tag to compare

@kojak8791 kojak8791 released this 01 Dec 12:49
Immutable release. Only release title and notes can be modified.

A fix for images on touch screens: they can be selected with a tap and resized with a finger.

Fixed

  • Images on touch screens (#1): a tap selects the image without opening the virtual keyboard. It had stopped working with prosemirror-view 1.43 and later.
  • Images on touch screens: the resize handles have a larger touch area, and a drag cancelled by the browser no longer changes the size.

0.5.1 - Table handles fix

Choose a tag to compare

@kojak8791 kojak8791 released this 30 Nov 13:48
Immutable release. Only release title and notes can be modified.

A fix for the table handles, which covered the row menu. Only the styles change.

Fixed

  • Table handles: the handles of the column and of the table were drawn over the row menu when it opened upwards. They now stay under every menu and the find bar.

0.5.0 - Compact toolbar and UI polish

Choose a tag to compare

@kojak8791 kojak8791 released this 26 Nov 17:40
Immutable release. Only release title and notes can be modified.

A compact toolbar for phones and narrow panels, figures with captions and an image dialog, and a lighter look for the popovers. No breaking API changes: the new toolbar item image is on as soon as you update, and --stilo-color-border no longer draws the borders of popovers and fields.

Added

  • Figures: an image in its own block with a caption under it (<figure>, <figcaption>). The caption is written in the document and takes every formatting of the editor (bold, links, colors, …) and line breaks, but no blocks or images: pasted blocks become lines. Enter leaves the caption for a new paragraph, Backspace at its start selects the figure. An empty caption shows only while its figure is selected, with the hint of the new Image option captionPlaceholder (default 'Caption').
  • Toolbar item image (after table in the default toolbar): a dialog that inserts a figure from an address or a local file (embedded as a data URL), with a preview, alternative text, title, width and a plain-text caption. With an image or a figure selected it edits it instead, without the caption, which is edited in the document. An edit button in the corner of the image under the mouse opens the same dialog. ToolbarContext gains openImageDialog().
  • Commands insertFigure and updateImage, with the types ImageAttributes and FigureAttributes.
  • Drop of image files: embedded where they are dropped, with the size limit and the imageRejected event of paste.
  • Compact toolbar for phones and narrow panels: the toolbar option layout: 'compact', or 'auto' to switch below the width compactBelow (default 576 px). Undo, redo, bold, italic and four group buttons (Text, Paragraph, Insert, More) that open their items in a second row; a row that does not fit scrolls sideways. Bigger buttons on touch screens. The option compact arranges the items in your own way (DEFAULT_COMPACT_TOOLBAR, types CompactToolbar and CompactToolbarGroup).
  • Documentation of your own extensions (API.md §4.1 and the framework guides): existing ProseMirror plugins, shortcuts and input rules go in through extensions when the editor is created, and your commands get their types.

Changed

  • Touch screens: the toolbar buttons no longer keep the hover color after a tap, and no longer flash when tapped.
  • A lighter look for the popovers, the find bar and their forms: no borders, popovers of translucent glass with a blur and a deeper shadow, text fields that stand out by a slightly darker background (lighter in dark) and show a ring when focused, flat secondary buttons. Fields and form buttons have one height everywhere (26px), whatever the font and line height of the page; labels and other secondary text are 1px smaller than the text. Smaller image dialog and character picker; the table size grid has no borders. New custom properties --stilo-color-popover-bg, --stilo-color-field, --stilo-color-button, --stilo-color-button-hover, --stilo-color-ring and --stilo-popover-blur; --stilo-color-border no longer draws popover and field borders.
  • HTML with a <figure> holding an image loads as a figure; before, the image became an inline image and the caption a paragraph.
  • maxInlineBytes also limits the data: URLs of dropped files, insertFigure and updateImage.
  • After a redo, the cursor goes next to the change instead of selecting again the text that was selected (prosemirror-history 1.5.2).
  • Tested with prosemirror-view 1.43, prosemirror-schema-list 1.6.1, prosemirror-inputrules 1.7, prosemirror-history 1.5.2, prosemirror-model 1.25.13, prosemirror-transform 1.12.7 and DOMPurify 3.4.18 (security fixes), the latest versions in the ranges of stilo-editor.

Fixed

  • Checklists: Enter in the middle of a checked item made the second half unchecked with prosemirror-schema-list 1.6.1 or later, which new installs get. It stays checked again.

0.4.0 - Dark theme and full screen

Choose a tag to compare

@kojak8791 kojak8791 released this 21 Oct 12:15
Immutable release. Only release title and notes can be modified.

Dark theme, full screen, and an option to turn the Markdown shortcuts off. No breaking changes: the new toolbar item is on as soon as you update, the dark colors only when your page sets color-scheme.

Added

  • Editor option markdownShortcuts (default true): false turns the Markdown shortcuts off, so #, >, * and the other Markdown characters are typed as text. Also a prop of the React, Vue and Svelte components.
  • Dark theme: every color of the toolbar, of the popovers and of content.css has a dark value, used when the page sets color-scheme: dark (or light dark to follow the system). Without color-scheme, and in browsers without light-dark(), nothing changes. The gap cursor takes the color of the text.
  • Toolbar item fullscreen, last in the default toolbar: the element that holds the toolbar and the editor fills the browser window, over the whole page (the browser's top layer, through the Popover API; older browsers: --stilo-z-fullscreen). Only the text scrolls: the toolbar and the status bar stay at the top and the bottom, with or without sticky. Esc in the editor leaves full screen, and the page scrolls back where it was. Meanwhile the page does not scroll and shows no scrollbar (class stilo-fullscreen-page on <html>). ToolbarContext gains toggleFullscreen() and isFullscreen(), and isActive of a custom button receives the context as second argument.

0.3.1 - Package keywords

Choose a tag to compare

@kojak8791 kojak8791 released this 20 Oct 19:03
Immutable release. Only release title and notes can be modified.

The package keywords name React, Vue, Svelte and Next.js, so that npm search finds the wrappers. No change in the code.

0.3.0 - Framework wrappers

Choose a tag to compare

@kojak8791 kojak8791 released this 20 Oct 13:46
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: the StiloEditor component with the default toolbar and the useStiloEditor hook 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: the StiloEditor component with the default toolbar and the useStiloEditor composable for a UI of your own. Vue 3.4 and later, server-side rendering. Vue guide
  • Svelte wrapper, stilo-editor/svelte: the StiloEditor component for Svelte 5, with bind:editor, and the actions stiloEditorWithUI (default toolbar) and stiloEditor (a UI of your own) for Svelte 4 and 5, also from stilo-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 returns false, also from .can(), and the toolbar disables its buttons, except find. setEditable now emits transaction, 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

0.2.1 - Documentation

Choose a tag to compare

@kojak8791 kojak8791 released this 16 Oct 09:15
Immutable release. Only release title and notes can be modified.

Documentation release: no code changes.

Changed

  • Shorter README, quick start first. The full list of features, shortcuts and Markdown shortcuts moves to docs/FEATURES.md.
  • New: CHANGELOG.md.
  • The npm page links to the live demo as the homepage.

0.2.0 - Tables, images, find and replace

Choose a tag to compare

@kojak8791 kojak8791 released this 16 Oct 08:54
Immutable release. Only release title and notes can be modified.

Second preview release. No breaking changes: with defaultExtensions() the new features are on as soon as you update.

Added

  • Tables: insert from a grid, merge and split cells, header row and column, resizable columns, handles on rows and columns that select them and open their menu.
  • Images: paste an image or a screenshot (embedded in the HTML, up to 5 MB by default), resize with side handles.
  • Checklists, with the [ ] and [x] Markdown shortcuts.
  • Code blocks, with an optional language (class="language-js").
  • Find and replace, with match case, whole word and an exact count of the matches.
  • Word and character count: getWordCount() and an optional status bar (createStatusBar).
  • Font family and font size in the toolbar.
  • Text alignment and line spacing of paragraphs and headings.
  • Text case: UPPERCASE, lowercase, Title Case, Sentence case, tOGGLE cASE.
  • Paste from Word and Google Docs: real lists, column widths of tables kept, the body font, size and color dropped.

Changed

  • defaultExtensions() includes the new extensions. Each one can be turned off with false, e.g. defaultExtensions({ table: false }).
  • New dependency: prosemirror-search.

Fixed

  • setHTML / setJSON were slow on large documents while the selection was inside the editor.
  • Changes to every block of a large document (text case, replace all) took quadratic time.
  • The # heading shortcuts dropped the alignment and the line spacing.

0.1.0 - First preview

Choose a tag to compare

@kojak8791 kojak8791 released this 16 Oct 08:48
Immutable release. Only release title and notes can be modified.

First preview release.

Added

  • Editor with HTML and JSON in and out, a strict allowlist for tags, attributes and styles, undo and redo.
  • Text: bold, italic, underline, strikethrough, inline code, subscript, superscript, text color, highlight, clear formatting.
  • Links, with a popover and a bubble to open, edit or remove them.
  • Blocks: paragraphs, headings 1–6, quotes, horizontal lines, line breaks, moving blocks up and down.
  • Bulleted and numbered lists.
  • Markdown shortcuts as you type, keyboard shortcuts for every command.
  • Paste cleanup: pasted HTML is cleaned up, plain text lines become paragraphs.
  • Default toolbar (stilo-editor/ui): sticky option, keyboard navigation, special characters and emoji picker.