StealThis .dev

News — Article Editor

A newsroom article editor built as a two-pane CMS surface: an editing column with an inline headline, italic standfirst, byline and a formatting toolbar that runs bold, italic, subheads, pull quotes, links and captioned press figures, beside a publishing sidebar for section, tags, Draft to Published status, SEO slug, cover treatment and live word count plus read time. A reader-style preview renders the finished article in justified editorial columns with a drop cap.

In Lab öffnen
html css vanilla-js
Targets: JS HTML

Code

Article Editor

A full newsroom writing surface for The Meridian Dispatch, split into two panes. On the left, the editing column holds an inline-editable headline set in a Playfair display serif, an italic standfirst, an editable byline with a live dateline and read-time meta, and a contenteditable body wearing a sticky formatting toolbar. The toolbar runs bold, italic, H2 subheads, oversized pull quotes, normal-paragraph reset, link insertion, and a figure tool that drops a simulated press photo with an italic caption and credit line straight into the copy. The lead paragraph carries a red drop cap and the columns are justified with hyphenation for a true printed feel.

On the right, a publishing sidebar handles everything around the words: a four-state status switch (Draft, In review, Scheduled, Published) with contextual notes, a removable tag list with an add field, a section select that re-flows the kicker, an SEO slug that can be synced from the headline, a cover image with cycle-able duotone treatments and an editable caption, and a length panel that recomputes word count, character count and read time as you type. A Preview toggle hides the chrome and re-renders the story in reader layout — multi-column, drop-capped, with a hero figure — and Save and Publish fire toast confirmations.

Everything is vanilla JavaScript over contenteditable and document.execCommand, with keyboard shortcuts (Cmd/Ctrl+S to save, Cmd/Ctrl+B/I for formatting), a dirty-state indicator in the top bar, and ARIA roles on the toolbar, status radiogroup and live regions. No frameworks, no network, no images — the photography is built entirely from CSS gradients.

Illustrative UI only — masthead, headlines, bylines, and articles are fictional; not a real news publication.