fore-codemirror

A CodeMirror-based editor mode that knows Fore's fx-* element and attribute vocabulary: it completes tag and attribute names, and flags unknown ones. It is a separate, optional module - not part of fore.js/fore-dev.js - loaded here via its own <script type="module" src="./dist/fore-codemirror-bundle.js">.

The vocabulary itself comes from src/fore-tree.json, hand-curated and grounded in Fore's own source code (see the README in this folder) - not generated from a doc.

Valid markup

Place the cursor inside a tag and start typing an attribute name (e.g. after <fx-bind ) to see completion suggestions.

Markup with mistakes

Contains a misspelled element (<fx-cotnrol>) and a misspelled attribute (calcualte) - both should show a lint warning (squiggly underline + gutter marker).

Wrong nesting

<fx-control> is placed inside <fx-model> (it would render but stay inert there), and <fx-bind> is placed outside <fx-model> (it would silently do nothing there) - both are flagged.