OpenForum Markup Reference

This reference documents the OpenForum markup language used in page.content files. OpenForum uses a custom markup syntax that gets converted to HTML through the DefaultRenderer, plus dynamic JavaScript features for interactive content.

Headers

Use exclamation marks for headers:

Text Formatting

Basic text formatting options:

Lists

Unordered lists use asterisks: Ordered lists use hash symbols:
  1. Numbered list item 1
  2. Numbered list item 2
  3. Numbered list item 3

Links

Various link formats:

Code Blocks

Use triple braces for code: This is a code block Multiple lines preserved No markup processing inside

Special Blocks

This is a callout/notice box

This is a paragraph block

This text is centered
This is a row container

Tables

Use pipe symbols for tables:
Column 1Column 2Column 3
Row 1 Cell 1Row 1 Cell 2Row 1 Cell 3
Row 2 Cell 1Row 2 Cell 2Row 2 Cell 3

Interactive Elements

Special Markup

Horizontal rule:
Line break:

Comments: Raw text (no processing): This text is not processed for markup Raw text goes here unchanged Sections: This is a section that can be cut/separated

Extensions

OpenForum provides many built-in extensions for enhanced functionality. Extensions are called using undefined syntax:

Common Extensions

Dynamic JavaScript Features

OpenForum provides powerful dynamic features that combine markup with JavaScript:

Variable Embedding

Embed JavaScript variable values that update automatically: Example markup: <div> Current time: Double curly brace currentTime Double curly brace Counter value: Double curly brace counter Double curly brace </div> Example page.js: var currentTime = new Date().toLocaleString(); var counter = 0; // Update every second setInterval(function() { currentTime = new Date().toLocaleString(); counter++; }, 1000);

Two-Way Data Binding with of-id

Link HTML input elements directly to JavaScript variables: Example: <form> <input type="text" of-id="userName" placeholder="Enter name" /> <input type="email" of-id="userEmail" placeholder="Enter email" /> <select of-id="userRole"> <option value="admin">Admin</option> <option value="user">User</option> </select> </form> <!-- Display the values --> <div>Name: Double curly brace userName Double curly brace, Email: Double curly brace userEmail Double curly brace, Role: Double curly brace userRole Double curly brace</div>

Dynamic Lists with of-repeatFor

Generate repeated HTML elements from JavaScript arrays: Example: <table> <thead> <tr> <th>Name</th> <th>Status</th> </tr> </thead> <tbody> <tr of-repeatFor="item in itemList"> <td>Double curly brace item.name Double curly brace</td> <td>Double curly brace item.status Double curly brace</td> </tr> </tbody> </table> Example page.js: var itemList = [ {name: "Item 1", status: "Active"}, {name: "Item 2", status: "Pending"}, {name: "Item 3", status: "Complete"} ];

Mixing HTML with Markup

You can freely mix HTML tags within OpenForum markup: Example: <div class="alert alert-info"> !!Important Notice ((This is a paragraph block within HTML div)) <form> <div class="form-group"> <label>Your name:</label> <input type="text" of-id="formUserName" class="form-control" /> </div> </form> [[Welcome Double curly brace formUserName Double curly brace!]] </div>

File Structure

Each OpenForum page consists of:

Best Practices

Common Patterns