| Recommend this page to a friend! |
| Packages of Matthew Asham | Binkterm PHP | docs/Markdown.md | Download |
|
|||||||||||||||||||||
Markdown and Markup FormattingBinktermPHP supports rich text formatting in echomail and netmail messages. When a network permits it, users can compose messages using Markdown or StyleCodes and have them rendered with full formatting in the message reader. Table of Contents
How It WorksMarkup support is opt-in per network via Admin BBS Settings ? Networks. When a user sends a message with a markup format selected, BinktermPHP adds a Messages without a Enabling Markup for an UplinkEnable markup for a network from Admin ? Networks. Edit the network and check the Allow Markup checkbox, then save. The Markup Format selector in the compose form is only shown to users when the destination network has markup enabled. It is hidden for plain networks and local-only areas. The Compose EditorMarkup Format SelectorWhen composing a message to a markup-enabled network, a Markup Format dropdown appears below the message body with three options: | Option | Kludge emitted | Editor mode |
|--------|---------------|-------------|
| Plain text | _(none)_ | Standard textarea |
| Markdown | The selector is also restored when replying to a marked-up message or loading a saved draft, pre-selecting the format that was originally used. Markdown EditorSelecting Markdown activates the Toast UI WYSIWYG editor ( Toolbar actions: | Button | Action | Keyboard shortcut |
|--------|--------|--------------------|
| B | Bold | Ctrl+B |
| I | Italic | Ctrl+I |
| H1 / H2 / H3 | Headings | ? |
| Edit / Preview tabs: Switch between raw Markdown editing and a rendered preview at any time. The preview uses the same server-side Image upload: The editor's Insert Image button opens a multi-tab picker with direct URL, file upload, existing uploaded-image selection, and clipboard paste support. In Markdown mode, BinktermPHP hosts the image and inserts the Markdown reference ( URL paste: Pasting a bare URL into the editor inserts it as a Markdown link. The editor writes clean Markdown back to the hidden textarea on every change. When the form is submitted, the raw Markdown source is what gets stored and sent in the packet ? not HTML. StyleCodes EditorSelecting StyleCodes shows a compact formatting toolbar above the standard textarea. Click a button to wrap the selected text with the corresponding StyleCodes delimiters: | Button | Delimiter | Effect |
|--------|-----------|--------|
| B | StyleCodes compose in a plain textarea ? the formatting is character-delimited inline markup applied directly in the message body. No split-pane view is used. The same Insert Image picker used by the Markdown editor is also available from the Plain text and StyleCodes toolbars. In those modes, selecting or uploading an image inserts the hosted image URL directly into the textarea instead of Markdown image syntax. Supported Markdown SyntaxBinktermPHP's renderer ( | Syntax | Result |
|--------|--------|
| Heading slugs are generated using GitHub-style rules. Explicit anchors in the form Supported StyleCodes SyntaxStyleCodes ( | Syntax | Result |
|--------|--------|
| URL slashes are not mistaken for italic delimiters ? the renderer excludes slashes adjacent to colons ( Rendering Incoming MessagesIncoming messages are rendered based on the | Kludge | Renderer |
|--------|----------|
| Remote images in Markdown messages are rendered as click-to-load placeholders by default ? the image is not fetched automatically. The user clicks the placeholder to load it. Inline The MARKUP Kludge and LSC-001The The full specification is in
LSC-001 also defines a format registry for additional identifiers (BBCode, Gemtext, StyleCodes, etc.). BinktermPHP currently implements SecurityWhether remote images in incoming Markdown are displayed inline or shown as click-to-load placeholders is controlled by the user's inline media setting in their account settings. The renderer HTML-escapes all content before applying Markdown transformations. Raw HTML in message bodies is never passed through to output; the Links are restricted to |