ligHTMetaL

Lightweight HTML editing with images, tables and source mode. Zero runtime dependencies.

All four libraries · HTML editor skins · Markdown editor · Markdown parser · Syntax highlighter

Format text, insert images, edit tables, or work directly in HTML source. The browser owns selection and undo. Your application owns persistence and uploads.

Type to edit. Select text and use the toolbar. Paste, drop, or insert images with the image button.

Text output

HTML output


      

Quickstart

Copy the prebuilt CSS and JavaScript beside your page. No build step is required.

<link rel="stylesheet" href="lightmetal.css">
<div id="editor" class="lightmetal"></div>
<script src="lightmetal.js"></script>
<script>
  const editor = lightmetal.init({
    element: document.getElementById('editor'),
    onChange: html => console.log(html)
  });
  editor.setHTML('<p>Hello, ligHTMetaL!</p>');
</script>

Read content with editor.getHTML() and call editor.destroy() when removing the editor. Choose toolbar controls with the actions option.

Use a maintained HTML sanitizer before rendering or publishing untrusted content. The editor filters HTML imports by default; Source edits and raw mode give your application direct control over HTML.