Extensibility & Developer Guide

FastEditor Plugin API v1.0

Extend FastEditor with lightweight JavaScript plugins. Customize visual line styling, trigger real-time alerts on live logs, or stream custom data formats without recompiling or managing native DLLs.

Sandboxed & Isolated: All plugins execute in isolated QuickJS runtime contexts. Runtime errors or missing dependencies are caught safely without crashing FastEditor or risking system stability.

What You Can Build (v1.0 Scope)

FastEditor's initial plugin release focuses on two high-impact extension points designed for incident triage and data pipeline integration:

1. Visual Highlighting & Incident Alerts

Match patterns in live logs or large documents using PCRE2 regular expressions or fast substring checks. Colorize rows, display custom badges in the gutter (e.g. CVE, WARN), and trigger sound chimes or Windows Action Center notifications during Live Tail.

plugin.registerHighlightRule({ ... })

2. Custom Streaming Exporters

Transform and export active tabular projections into proprietary formats (such as custom XML envelopes, custom schema JSON, or legacy flat files). Streaming serializers process data row-by-row in 64 KB chunks, ensuring constant low memory usage even on 50+ GB files.

plugin.registerExporter({ ... })

Plugin Quick Start

A FastEditor plugin is simply a folder containing a manifest.json and an entry JavaScript script (such as index.js).

1 Plugin Folder Location

Create a new folder in your FastEditor plugins directory:

%APPDATA%\FastEditor\plugins\my-custom-plugin\
  ├── manifest.json
  └── index.js

2 Define the Manifest (manifest.json)

{
  "id": "security.cve-highlighter",
  "name": "Security CVE and Threat Highlighter",
  "version": "1.0.0",
  "minFastEditorVersion": "1.0.0",
  "entryPoint": "index.js"
}

3 Write the Script (index.js) — Highlighting & Alerts Example

Exact excerpt from plugins-example/security-cve-highlighter/index.js:

// Security CVE and Threat Highlighter Plugin
// Registers high-priority visual highlighting and tray alerts for vulnerability identifiers

plugin.registerHighlightRule({
  id: "cve-detector",
  pattern: "CVE-\\d{4}-\\d{4,7}",
  isRegex: true,
  ignoreCase: true,
  fgColor: 0xFFFFFF,
  bgColor: 0x00008B,      // Dark Red in BGR ($00008B)
  gutterIcon: "CVE",
  gutterColor: 0x0000FF,  // Bright Red in BGR ($0000FF)
  sound: true,
  notify: true
});

plugin.registerHighlightRule({
  id: "sql-injection-detector",
  pattern: "(UNION\\s+SELECT|SLEEP\\(\\d+\\)|WAITFOR\\s+DELAY)",
  isRegex: true,
  ignoreCase: true,
  fgColor: 0xFFFFFF,
  bgColor: 0x8B0000,      // Dark Blue in BGR ($8B0000)
  gutterIcon: "SQLi",
  gutterColor: 0xFF0000,  // Bright Blue in BGR ($FF0000)
  sound: false,
  notify: true
});

3b Custom Streaming Exporter Example (index.js)

Exact excerpt from plugins-example/custom-xml-exporter/index.js:

// Custom XML Record Exporter Plugin
// Demonstrates streaming custom XML records from FastEditor projection data

function escapeXml(str) {
  if (!str) return "";
  return str
    .replace(/&/g, "&")
    .replace(/</g, "&lt;")
    .replace(/>/g, "&gt;")
    .replace(/\"/g, "&quot;")
    .replace(/\'/g, "&apos;");
}

function sanitizeTag(name) {
  if (!name) return "field";
  var cleaned = name.replace(/[^a-zA-Z0-9_-]/g, "_");
  if (/^[0-9]/.test(cleaned)) cleaned = "col_" + cleaned;
  return cleaned;
}

plugin.registerExporter({
  id: "xml-records",
  label: "XML Records (*.xml)",
  fileExtension: "xml",
  serializeRow: function(cells, headers) {
    var xml = "  <record>\n";
    for (var i = 0; i < cells.length; i++) {
      var tag = (headers && headers[i]) ? sanitizeTag(headers[i]) : "col_" + (i + 1);
      var val = escapeXml(cells[i]);
      xml += "    <" + tag + ">" + val + "</" + tag + ">\n";
    }
    xml += "  </record>\n";
    return xml;
  }
});

4 Reload and Test in FastEditor

Press Ctrl+Shift+P → select Reload Plugins. FastEditor reloads all plugin scripts in place without restarting.

Explore the Plugin Catalog

Download curated, verified official plugins and starter recipes directly from our catalog to see complete working packages.

Browse Plugin Directory →

Full Technical API Reference

For exhaustive parameter definitions, color format tables, lifecycle events, and zero-leak memory contracts, consult the complete developer specification in the repository.

View Complete Reference →