Copyright © 2026 Mediachance. All rights reserved.

Advanced Concepts

Designed by Cranky Man EDITORIAL text editing, reimagined

Scripting is the optional but awesome deeper layer of Editorial

(and you don’t even need to write it yourself)

The purpose of scripting in Editorial is not to turn writing into programming. The purpose is to let the document become processable in a structured way with a direct lane to local or cloud LLM (Ai models). The Editorial Script is a small, case-sensitive language with BASIC-like statements and access to block/document objects. It has a very rich text processing functionality including triple quoted multiline strings (great fro writing long prompts!) The other part is a very comprehensive access to the (local or cloud) connected LLM server where you can build complex messages to be sent to the model.
The Script language syntax:
The scripting syntax document is intentionally written in an AI-friendly format. It begins with a clear document structure introduction, so the script language is easy not only for humans to read, but also for modern AI models such as ChatGPT or Claude to understand. You should be able to paste the scripting syntax directly into an AI, then describe what you want the workflow to do, and ask it to generate a working script. For example a simple word count: Read the syntax file and write an Editorial script that counts the number of words in the live version of all text blocks, while skipping summary, outline, and lore blocks. Or a Labeling script: Read the syntax file and Create a script that scans all blocks and labels text blocks that mention “Jack” using a label “Jack”. Or more sophisticated writing script: Read the syntax file and Create a script that reads outline block, expands them into chapter blocks bellow, (label each chapter blocks “chapter”, then walks through all “chapter” blocks and adds scene starter blocks for each using any existing lore in system prompt. Let’s see how ChatGpt works through the first task: word count
// Count words in all live TEXT blocks only let totalWords = 0 for block in document if block.type == TEXT then totalWords = totalWords + wordCount(block.text) endif next block print "Live manuscript word count: " + str(totalWords)
That is correct! I also tested the “writing script” example by adding the syntax md file and copy pasted the exact prompt to ChatGPT and the script was also 100% correct on first trial (it’s 130 lines so I’m not publishing it here) This certainly makes the script feature useful even for people who are not into coding! You can enhance the Editorial in ways that were hard to imagine before AI.