Rich text editing for malleable HTML

Rich Clay turns a marked element into a rich text editor backed by Squire and DOMPurify, keeping the live DOM as the document with no build step.

Keeping a commonplace book

A commonplace book is a working collection of passages, observations, and rough ideas kept in one place. Unlike a diary, it is organized by subject rather than by date, and you revise entries as your thinking changes.

Write down what surprises you while you are still surprised, then trim the rest next week.

What belongs on a page

Good entries stay concrete and brief. Copy the exact sentence you want to remember, note why it caught your attention, and leave room underneath for later replies.

  • One clear source title and page number
  • A short quotation in the author's own words
  • Two or three plain sentences of your own reaction

Click anywhere in this note to rewrite a sentence, change a heading, indent a list item, or test undo and redo from the toolbar above.

Nothing you type here is saved, and reloading the page starts fresh.

What makes this page work

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/richclay@0.6.1/richclay.css">
<script src="https://cdn.jsdelivr.net/npm/richclay@0.6.1/vendor/purify.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/richclay@0.6.1/vendor/squire.js"></script>
<script src="https://cdn.jsdelivr.net/npm/richclay@0.6.1/richclay.js"></script>

<div data-richclay><p>Write here.</p></div>
<script>RichClay.init();</script>