Skip to content

Micron Composer Web-App for Reticulum NomadNet Pages Creation / Editing, with easy code syntax controls

License

Notifications You must be signed in to change notification settings

fr33n0w/micron-composer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Micron Page Composer v1 (beta)

A powerful WYSIWYG editor for creating NomadNet-ready .mu pages using the Micron markup language.


Version License Micron


screen

πŸ“‹ Overview

Micron Page Composer is a web-based, visual editor that makes it easy to create beautifully formatted pages for NomadNet using the Micron markup language. With an intuitive interface, real-time preview, and comprehensive formatting tools, you can create rich, interactive content without memorizing complex syntax.

✨ Features

🎯 Dual Editing Modes

  • Top Toolbar: Insert Micron code directly at cursor position
  • Floating Toolbar: Select text to format it with the context-aware floating toolbar

🎨 Rich Formatting Options

  • Text Styles: Bold, italic, underline with keyboard shortcuts (Ctrl+B, Ctrl+I, Ctrl+U)
  • Colors: Full RGB color picker for text and backgrounds (3-digit hex)
  • Alignment: Left, center, right alignment with easy open/close tags
  • Headers: Three levels of section headers (H1, H2, H3)

πŸ”— Interactive Elements

  • Links: Create hyperlinks with optional bold/underline styling
  • Input Fields: Text fields with custom width and password masking
  • Checkboxes: Multi-select options with pre-checked states
  • Radio Buttons: Mutually exclusive options grouped by name

🎭 Visual Enhancements

  • Dividers: 20+ decorative divider styles (lines, stars, diamonds, etc.)
  • Emojis: Built-in emoji picker with multiple categories
  • ASCII Art: Extensive ASCII character library for boxes, lines, arrows, symbols

✨ Special Features

  • Magic Auto-Format: Experimental AI-powered page beautification
  • Live Preview: Real-time Micron rendering as you type
  • External Preview: Open preview in separate window for dual-monitor workflow
  • Auto-Save: Content automatically saved to browser localStorage
  • Syntax Help: Comprehensive Micron syntax reference guide

πŸ“ Editor Features

  • Three View Modes: Edit, Preview, and Code viewer tabs
  • Character Counter: Real-time line/character count
  • 130 Character Warning: MeshChat compatibility indicator
  • Undo/Redo: Full history with Ctrl+Z / Ctrl+Y
  • Strip Codes: Remove all formatting to get plain text
  • Export: Download as .mu file ready for NomadNet

πŸš€ Quick Start

Use it online on github at:

https://fr33n0w.github.io/micron-composer/

or you can download and use it locally following the instructions below.

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/micron-composer.git
cd micron-composer
  1. Open in browser:
# Simply open index.html in your web browser
# Or use a local server (recommended):
python -m http.server 8000
# Then navigate to http://localhost:8000/index.html

Usage

  1. Start Editing: Type or paste content in the editor
  2. Format Text:
    • Click toolbar buttons to insert formatting codes
    • Select text and use floating toolbar for quick formatting
  3. Preview: Switch to "Page Preview" tab to see rendered output
  4. Export: Click "Export file" to download your .mu page

πŸ“– Micron Syntax Quick Reference

Text Formatting

`!Bold text`!          - Bold
`*Italic text`*        - Italic  
`_Underlined text`_    - Underline
``                     - Reset all formatting

Colors

`FxxxText`f            - Text color (xxx = 3-digit hex)
`BxxxText`b            - Background color
`Ff00Red text`f        - Example: Red text

Alignment

`cCentered text`a      - Center align
`lLeft aligned`a       - Left align
`rRight aligned`a      - Right align

Headers

>Header Level 1        - Main header
>>Header Level 2       - Subheader
>>>Header Level 3      - Sub-subheader

Links

`[Link text`/path/to/page.mu]     - Basic link
`[`destination.mu]                - Link without custom text

Input Fields

`<fieldname`default value>              - Text field
`<24|fieldname`value>                   - Sized field (24 chars)
`<!16|password`Enter password>          - Masked password field

Checkboxes & Radio Buttons

`<?|field|value`Label text>             - Checkbox
`<?|field|value|*`Pre-checked>          - Pre-checked checkbox
`<^|group|value`Option 1>               - Radio button
`<^|group|value|*`Selected>             - Pre-selected radio

Dividers

-                      - Simple horizontal line
-=                     - Equal signs divider
-━                     - Heavy line divider
-β˜…                     - Star divider

Comments

# This is a comment    - Not displayed in output

πŸ› οΈ Technical Details

This is a first release beta version, so could have some bugs, in case open a gihtub issue or contact the developer at lxmf address:

0d051f3b6f844380c3e0c5d14e37fac8

Built With

  • HTML5/CSS3/JavaScript - Core technologies
  • Original Micron Parser - Official NomadNet Micron parser (JavaScript port)
  • DOMPurify - XSS protection and HTML sanitization
  • localStorage API - Auto-save functionality

Browser Compatibility

  • βœ… Firefox (Recommended)
  • βœ… Chrome/Chromium
  • βœ… Edge
  • βœ… Safari
  • ⚠️ Best experience with Firefox

File Structure

micron-composer/
β”œβ”€β”€ composer.html           # Main HTML file
β”œβ”€β”€ styles.css             # All styling
β”œβ”€β”€ editor.js              # Editor logic and functionality
└── script/
    β”œβ”€β”€ micron-parser_original.js  # Official Micron parser
    └── purify.min.js      # DOMPurify library

🎯 Micron Syntax Features Supported

  • βœ… Text formatting (bold, italic, underline)
  • βœ… Foreground and background colors (3-digit hex)
  • βœ… Text alignment (left, center, right)
  • βœ… Section headers (3 levels)
  • βœ… Horizontal dividers (plain and custom characters)
  • βœ… Hyperlinks with form field submission
  • βœ… Input fields (text, password, sized)
  • βœ… Checkboxes (single and pre-checked)
  • βœ… Radio buttons (grouped and pre-selected)
  • βœ… Comments (lines starting with #)
  • βœ… Literal text mode (escape sequences)
  • βœ… Format reset codes

πŸ“± Features

Auto-Save

Content is automatically saved to browser localStorage every time you type. Your work persists across browser sessions unless you:

  • Click "Clear page"
  • Click "Start New Page" and confirm
  • Clear browser data

Keyboard Shortcuts

  • Ctrl+B - Bold
  • Ctrl+I - Italic
  • Ctrl+U - Underline
  • Ctrl+S - Convert to Micron
  • Ctrl+Z - Undo
  • Ctrl+Y / Ctrl+Shift+Z - Redo
  • Esc - Close modal

MeshChat Compatibility

  • Real-time character counter
  • 130 character per line limit indicator
  • Optimal formatting for terminal display

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Areas for Contribution

  • Additional divider styles
  • More emoji categories
  • Additional ASCII art characters
  • Improved Magic auto-format algorithm
  • Additional export formats
  • Internationalization

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • NomadNet - For the Micron markup language
  • Mark Qvist - Original Micron parser implementation
  • Reticulum Network - Mesh networking stack
  • DOMPurify - XSS protection library

πŸ“ž Support

πŸ—ΊοΈ Roadmap

  • Template library
  • Custom color palettes
  • Multi-page project support
  • Direct NomadNet publishing
  • Collaborative editing
  • Mobile-optimized interface
  • Dark/Light theme toggle
  • Import from existing .mu files

πŸ“Έ Screenshots

screen2 ---

Made with ❀️ for the NomadNet community

Keep your lines under 130 characters for MeshChat compatibility!

About

Micron Composer Web-App for Reticulum NomadNet Pages Creation / Editing, with easy code syntax controls

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published