A Firefox extension that allows you to easily convert Markdown text to Textile format directly in your browser.
- Convert selected Markdown text to Textile with a single right-click
- Built-in popup interface for converting larger pieces of text
- Works in text areas, input fields, and contentEditable elements
- Live Preview mode with real-time conversion as you type
- Keyboard shortcut Ctrl+Enter for quick conversion
- Send to Tab button to insert converted text into active page
- Conversion history with last 10 entries
- Supports common Markdown elements:
- Headers (h1-h6)
- Emphasis (bold/italic, including nested)
- Lists (ordered/unordered, nested)
- Task lists (
- [x]/- [ ]) - Links and images
- Inline code and code blocks (with language support)
- Blockquotes (single and nested)
- Footnotes
- Definition lists
- Tables with alignment
- Horizontal rules
- Strikethrough
Visit the Add-on page and click "Add to Firefox"
-
Clone this repository:
git clone https://github.com/dkd-dobberkau/markdown-to-textile.git -
Open Firefox and navigate to
about:debugging#/runtime/this-firefox -
Click "Load Temporary Add-on" and select any file from the extension directory (e.g.,
manifest.json)
- Select Markdown text on any webpage
- Right-click and choose "Convert Markdown to Textile"
- The selected text will be replaced with its Textile equivalent
- Click the extension icon in the Firefox toolbar
- Enter or paste Markdown text in the top textarea
- Click "Convert" (or press Ctrl+Enter) to transform it to Textile
- Enable "Live Preview" for real-time conversion while typing
- Use "Copy to Clipboard" or "Send to Tab" for the result
- Access previous conversions via the History dropdown
| Markdown | Textile |
|---|---|
# Heading |
h1. Heading |
**bold** |
*bold* |
*italic* |
_italic_ |
[Link](url) |
"Link":url |
`code` |
@code@ |
```code``` |
bc. code |
> quote |
bq. quote |
>> nested |
bq(2). nested |
- [x] done |
* {color:green}(/){color} done |
[^1] |
[1] (footnote ref) |
Term\n: Def |
- Term := Def |
| Tables | Textile tables with alignment |
The project includes a comprehensive build script for version management and packaging:
# Install web-ext globally (if not already installed)
npm install -g web-ext
# Build with patch version increment (1.0 → 1.0.1)
npm run build
# Build with minor version increment (1.0.1 → 1.1.0)
npm run build:minor
# Build with major version increment (1.1.0 → 2.0.0)
npm run build:major
# Set specific version
node build.js --version=2.5.3npm run build- Increment patch version and buildnpm run build:minor- Increment minor version and buildnpm run build:major- Increment major version and buildnpm test- Run conversion tests with example Markdownnpm run test:interactive- Interactive testing modenpm run lint- Validate extension with web-ext lintnpm run start- Run extension in Firefox for testingnpm run package- Build package without version bump
The build script automatically:
- Updates version in
manifest.json - Runs web-ext lint to validate extension
- Builds extension package (.zip file in
web-ext-artifacts/) - Creates git tag for the version
- Shows next steps for committing and pushing
# Make your changes, then:
npm run build:minor # Updates version and builds
git add .
git commit -m "Release v1.1.0"
git push && git push --tagsIf you prefer to use web-ext directly:
web-ext lint --source-dir=./markdown-to-textile
web-ext build --source-dir=./markdown-to-textile
web-ext run --source-dir=./markdown-to-textileThe project includes 48 assertion-based tests across 14 suites:
# Run all conversion tests
npm testTest suites cover: Headers, Emphasis, Lists (flat + nested), Task lists, Links/Images, Code (inline + blocks), Blockquotes, Footnotes, Definition lists, Tables, Input validation, and Mixed content.
manifest.json- Extension metadata and configurationmarkdown-to-textile.js- Core conversion logicbackground.js- Background script for context menu integrationcontent.js- Content script for DOM manipulationpopup/- Files for the popup interface
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Mozilla Public License Version 2.0 - see the LICENSE file for details.
- Inspired by the need to work with both Markdown and Textile formats
- Thanks to all contributors who help improve this extension