Urgent.News

What's breaking now, across thousands of outlets.

Tech

DREI: WYSIWYG Emacs for HTML

DREI, which stands for DREI Rich Emacs Implementation, is a new tool designed to make editing HTML more user-friendly and efficient. It is a Tauri app that implements many Emacs text-editing commands, including Blockquote, Heading, and Link. These commands allow users to add HTML elements using Javascript. However, DREI is not without its limitations; it currently does not support incremental search and undo.

To use DREI, users specify an input file or URL and a CSS selector that designates the editable part of the page. For example, to edit the entire contents of a page read from a file, the user would type "drei --file filename.html". To read a page from a web server and edit it, the user would type "drei --selector '#contents' --url https://example.com/index.html". DREI then reads the page using HTTP GET, makes the necessary edits, and writes it back using HTTP PUT.

One of the unique features of DREI is its ability to write back only the edited part of the page, instead of the entire page. This allows the server to pre-process the page before feeding it to DREI and post-process it after updates. This results in a more streamlined editing experience, as the server takes care of boilerplate and the stored file contains only the core page.

DREI is still in the alpha stage, but it offers a more enjoyable editing experience than other tools the author has used. The ability to see the final product as it is being written is a significant improvement over the "punched-card feeling" of using a compiled approach to text generation.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at speechcode.com →

More in Tech

More from Sunday 9 August →