A TinyMCE plugin for cleaning up HTML copy-paste disasters

Introduction This post is about a plugin I wrote for TinyMCE v5.10.2, which cleans up some mess that often occurs in the HTML code when copy-pasting text from the document to itself. It doesn’t cover copy-pasting from other sources, however the plugin is easily modified to wipe away all kinds of superfluous HTML. See this [...]

Notes while deploying TinyMCE v5

Introduction These are my notes as I adopted TinyMCE v5 for use as the editor for writing things to be published on the Internet. Like this post, for example. My overall verdict is that it’s excellent, and I’m writing this after having added quite some unusual features to it. In particular, syntax highlighting where the [...]

Random JavaScript jots

This is just a bunch of jots I’ve made about JavaScript, in no particular order. Posted here, because the alternative was to delete them. JavaScript is single-threaded by its nature. Nothing runs in parallel, hence no need for any synchronization or atomics. There is actually an Atomic class, but for use in conjunction with shared [...]

A TinyMCE plugin for integrating Highlight.js

Introduction In this post I describe how I integrated the Highlight.js syntax highlighting tool into TinyMCE v5.10.2 for the sake of highlighting code while writing blog posts. So one gets the button saying “HL” as shown here: I’ve taken a somewhat different approach than usual, mainly in three aspects: TinyMCE has a capability to insert [...]

Quill: The DOM, Parchment, and Delta views of the document

Everything in this post relates to Quill v1.3.7. I don’t do web tech for a living, and my knowledge on Quill is merely based upon reading its sources. Besides, I eventually picked another editor for my own use. The trio The most remarkable thing with the Quill editor, is that it constantly retains three representations [...]

Quill internals and the base blot classes: Block, Inline, Embed and friends

Everything in this post relates to Quill v1.3.7. I don’t do web tech for a living, and my knowledge on Quill is merely based upon reading its sources. Besides, I eventually picked another editor for my own use. Introduction Quill offers a variety of blot classes, which are the base for creating custom blot classes [...]

Quill internals and the jumping cursor + the Selection and Cursor classes

Everything in this post relates to Quill v1.3.7. I don’t do web tech for a living, and my knowledge on Quill is merely based upon reading its sources. Besides, I eventually picked another editor for my own use. TL;DR If you’ve reached this page, odds are that you’re trying to figure out why the cursor [...]

Quill, Shift-Enter and <br> tags

Everything in this post relates to Quill v1.3.7. I don’t do web tech for a living, and my knowledge on Quill is merely based upon reading its sources. Besides, I eventually picked another editor for my own use. Introduction These are my somewhat wandering and inconsistent notes as I solved the issue of Shift-Enter for [...]

Quill internals: formatAt() in detail, and nesting of DOM tags

Everything in this post relates to Quill v1.3.7. I don’t do web tech for a living, and my knowledge on Quill is merely based upon reading its sources. Besides, I eventually picked another editor for my own use.. Introduction This post is a collection of findings I made while trying to figure out the following: [...]

Pasting into a Quill editor: Making the text take formatting as usually expected

Everything in this post relates to Quill v1.3.7. I don’t do web tech for a living, and my knowledge on Quill is merely based upon reading its sources. Besides, I eventually picked another editor for my own use. Introduction One of the odd things with Quill is that pasting into the editor window retains the [...]