Pandoc PHP port

WordPress block usage guide

The WordPress writer prefers core blocks for structures WordPress can edit directly. It keeps Custom HTML for explicit raw HTML and narrow cases where changing the block type would lose source meaning.

31261block instances
11block types emitted
108successful WP samples counted

Block Selection

BlockCountUsed whenSerialized asFallback rule
core/group
wp:group
401Pandoc Div containers, metadata review wrappers, mixed figures, definition-list wrappers, list headers, and generated footnotes.<!-- wp:group --> with a <div class="wp-block-group ..."> wrapper and nested core blocks.Used when a source structure is a container rather than a single paragraph/list/table/image block.
core/paragraph
wp:paragraph
23597Pandoc paragraphs, plain text blocks, generated figure captions, definition terms, and inline-only fallback content.<!-- wp:paragraph --> with <p> content.Inline formats stay inside the paragraph as WordPress-rich-text-compatible HTML tags.
core/heading
wp:heading
4289Pandoc headings and headings nested inside group-rendered containers.<!-- wp:heading {"level":N} --> with <hN> content.Heading levels are clamped by the reader before this writer sees them.
core/list
wp:list
1423Bullet lists, ordered lists, task lists, metadata entries, definition values, and footnote lists.<!-- wp:list --> or <!-- wp:list {"ordered":true} --> with <ul>/<ol>.Definition lists use editable list blocks because WordPress core has no definition-list block.
core/table
wp:table
586Pandoc tables, including captions, column metadata, row spans, and cell attributes where available.<!-- wp:table --> with a <figure class="wp-block-table"><table>...</table></figure> body.Table internals remain HTML because that is how the core table block stores rows and cells.
core/image
wp:image
128Image-only paragraphs and figures where the figure can be represented as one image plus optional caption.<!-- wp:image --> with <figure class="wp-block-image">.Figures with mixed child blocks become core/group so their children remain editable.
core/quote
wp:quote
56Pandoc block quotes.<!-- wp:quote --> with <blockquote class="wp-block-quote">.Nested content is serialized as standard HTML inside the quote body, matching core quote storage.
core/verse
wp:verse
10Pandoc line blocks, poetry-style text, and line-sensitive extracted content.<!-- wp:verse --> with <pre class="wp-block-verse">.Used instead of a paragraph with manual <br> tags when the source is a Pandoc LineBlock.
core/code
wp:code
653Code blocks, raw TeX blocks, and raw non-HTML format blocks.<!-- wp:code --> with <pre class="wp-block-code"><code>.Highlighted code can become Custom HTML because the highlighter emits styled HTML.
core/separator
wp:separator
66Pandoc horizontal rules.<!-- wp:separator --> with <hr class="wp-block-separator ..."/>.No fallback is normally needed.
core/html
wp:html
52Explicit source raw HTML, HTML raw-format blocks, highlighted code output, and last-resort unknown block fallback.<!-- wp:html --> with the original or generated HTML.This is intentionally kept for source HTML where converting to another block would change meaning.
syntaxhighlighter/code
wp:syntaxhighlighter/code
0Optional SyntaxHighlighter plugin output when that writer option is enabled.<!-- wp:syntaxhighlighter/code -->.The showcase does not enable this option by default.

Inline Formats

Inline Pandoc nodes stay inside editable core blocks whenever the surrounding block is editable. WordPress stores these formats as HTML inside rich text fields.

Pandoc inlineWordPress-rich-text markup
Strong<strong>...</strong>
Emph<em>...</em>
Code<code>...</code>
Link<a href="...">...</a>
Strikeout<del>...</del>
Underline<u>...</u>
Superscript / Subscript<sup>...</sup> / <sub>...</sub>
LineBreak<br/>
SmallCaps<span style="font-variant:small-caps">...</span>
NoteAn inline backlink reference plus a generated footnotes group/list at the end.

Custom HTML Boundaries

core/html is still used deliberately for raw HTML input, raw HTML format blocks, and highlighter output. Those are source-authored or generated HTML fragments where converting to another block would be less faithful.