asignua/filament-rich-editor-toolkit
A Filament RichEditor toolkit adding customizable toolbar buttons, plugins, and content tools for Laravel admin forms. Extend rich text editing with reusable actions and a smoother authoring experience.
composer require then run php artisan filament:assets — v1.1.0 ships new and changed editor modules, and the editor-side plugins are what make the new rendering work. Run php artisan config:clear too if you cache config.config/renderer.php (renderer.link_options, renderer.image_properties) and config/paste_clean.php (paste_clean.remote_image_guests, remote image allow-list). These are the only knobs that restore 1.0 behaviour.RichEditorToolkit::renderer($html) instead of echoing the raw value, e.g. in a Blade component or model accessor. Then diff the output against a page you already had in production — this release changes markup with no code change on your side.<figure><img><figcaption> block, and an empty-alt image into the editor, save, and inspect the rendered HTML. You should see target/rel handling, span.asignua-rte-figure / span.asignua-rte-caption, and the empty-alt <img> retained.// config/renderer.php
'link_options' => false,
'image_properties' => false,
or per call: RichEditorToolkit::renderer($html, links: false, images: false) / RichEditorToolkit::plugins(links: false, images: false).plugins() and renderer() as a pair, ideally behind one app-level helper:
$renderer = fn (string $html) => RichEditorToolkit::renderer($html, links: true, images: true);
renderer.link_options and renderer.image_properties values so you can enable the new output on a marketing section before flipping the whole app, and flip back without a deploy.HtmlString cast, or an API resource) so every consumer gets the same link/caption/alt behaviour. Ad-hoc {!! $html !!} calls scattered across views will silently keep raw <figure> markup and unnormalised rel.link_options.rel_tokens list up front — nofollow, sponsored, ugc all need to be listed or they are filtered out of rendered anchors. Anything that must survive authoring should be a token..asignua-rte-figure / .asignua-rte-caption, and during migration write comma-separated selectors that also match legacy figure / figcaption so old and new content look the same.paste_clean.remote_image_guests / authorizeRemoteImages(). Prefer a Gate/policy that checks the user and rate-limits, since the fetch happens without a proxy.*.co.uk) with explicit hosts; the new matching no longer honours them, so remote images will fail silently rather than error.rel, _blank forcing noopener noreferrer, figure→span re-render, empty alt kept) pays for itself the next time output changes by default.figure/figcaption, and any JS that queried those tags to break.figcaption markup is flattened. Bold, links, and line breaks inside old captions are lost on re-render. If your content relies on rich captions, back up and pre-process, or keep images: false on those surfaces.rel is a whitelist, not a pass-through. Any rel value not in link_options.rel_tokens is dropped — a common cause of "SEO attributes disappeared". Adding noopener noreferrer on _blank is forced and cannot be suppressed per-link.target only survives as _blank. _self, _parent, frames, and named targets are dropped; audit internal links that relied on named targets.<img alt=""> is now kept. Decorative images that previously vanished from output will reappear — check a11y assertions, lazy-loading selectors, and CSS that assumed presence/absence.*.co.uk, *.github.io-style patterns need explicit hostnames; verify with a real paste, because the failure mode is a missing image, not an exception.php artisan filament:assets on every deploy. Skipping it leaves the JS modules out of sync with the renderer, producing editor/renderer drift that looks like a rendering bug.RichEditorToolkit::plugins() to confirm which plugins are active, then diff renderer($html) before and after the upgrade on a real record. Most "bugs" here are one of the three flags being off in one place and on in another.plugins(), rel_tokens is a plain config list, and the renderer accepts per-call flags — so you can scope behaviour by model, panel, or route rather than committing app-wide.How can I help you explore Laravel packages today?