Djot Playground

[Djot-PHP] converts Djot markup to HTML. Edit on the left, see the result on the right.

Output is XHTMLed and sanitized via HTMLPurifier for security. For raw output, clone the sandbox repo and run locally in debug mode.

Test Examples

Profile Feature Restriction

Select different profiles to see how content gets filtered. Violations show which elements were converted to plain text.

Article Profile Test

Select "Article" profile - all formatting except raw HTML blocks.

# Full Formatting Works

*Bold*, _italic_, {=highlight=}, `code` - all allowed!

``` =html
<script>alert('This raw block is filtered')</script>
```

Tables, images, footnotes all work in article mode.
Comment Profile Test

Select "Comment" profile - images, headings, and tables will be filtered.

# This heading will be filtered

*Bold*, _italic_, {=highlight=}, 2^10^ all allowed!

> Blockquotes and `code` work too.

![This image is not allowed](/img/cake.icon.png)

| Tables | Not | Allowed |
|--------|-----|---------|

[Links](https://example.com) work fine!
Minimal Profile Test

Select "Minimal" profile - basic formatting and lists, no links or highlights.

*Bold*, _italic_, `code`, 2^10^, {+insert+}, {-delete-} work!

- Lists work too
- With nesting

{=Highlights=} become plain text.

Links like [this](https://example.com) are filtered.
Raw HTML Test

Raw HTML requires "No filter" profile and "Raw" mode enabled.

Inline raw: `<span style="color:red">red text</span>`{=html}

Block raw HTML:

``` =html
<div class="alert alert-info">
  <strong>Note:</strong> This is raw HTML!
</div>
```
Warnings & Errors

Copy and paste these to test warnings and errors:

Warning Example

Enable "Warnings" checkbox to see undefined reference warnings.

[undefined link][missing-ref]

This has an undefined footnote[^missing].
Strict Mode Example

Enable "Strict" checkbox to see errors for unclosed blocks.

::: warning
This div is never closed.

Send your feedback or bugreport!