Skip to main content

Introduction

OhashiRichTextEditor is a rich text editor for Laravel, built as a Web Component with Shadow DOM, with the server-side half of the job — sanitising the HTML it produces — in the same Composer package.

In development

v1.0 has not been released yet; v0.1.0 is an early release. This manual describes what works today and marks what is still to come. Before 1.0, names (attributes, ::part(), CSS custom properties, events) may still change.

What it is for​

  • Nothing on the page can break it. The editor lives in its own shadow tree: the page's CSS selectors and scripts — jQuery, Bootstrap, Inertia page transitions — cannot reach inside it.
  • Safe HTML, end to end. Saved and displayed HTML goes through a server-side sanitiser built on an HTML5 parser, and the browser cleans stored content before showing it too.
  • Comfortable with Japanese IME (v1.0). Confirming a conversion must never fire a stray Enter.
  • One composer require. Sanitising and image uploads included; no Node.js needed on your side for Blade.

Status​

FeatureStatus
<ohashi-rich-text-editor> element (Shadow DOM, form submission, SSR-safe)Available
Blade component <x-ohashi-editor>Available
Inertia wrappers for Vue 3 and ReactAvailable
Server-side sanitiser, SanitizedHtml cast, <x-ohashi-content>Available
Theming with CSS custom properties and ::part()Available
Undo/Redo (Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z), with the editor's own historyAvailable
Paste and drag-and-drop cleaning; tidy HTML that does not grow as it is editedAvailable
IME: composition is never interrupted by the editorAvailable (checked on Linux / Chrome and macOS / Safari; Windows not yet — see browser support)
Toolbar: bold, italic, strikethrough, headings, quote, lists, links, code blocks; keyboard shortcuts; English and JapaneseAvailable
Image uploads (button, paste, drag-and-drop; width presets and alt text) and error messages in the editorAvailable
Livewire integration (wire:model, .live, re-renders, wire:navigate; Livewire 3 and 4)Available
Tables, HTML source mode and HTML lintv1.1

Next steps​