Skip to content

Support tag classes on HTML Exports #5787

@Jakob-Espersen

Description

@Jakob-Espersen

Describe the Bug

We have some custom css that uses the tags applied on the page via classes in

body:not(.tag-pair-contenttype-policy) ol li::before { //styles }

This will work in bookstack where the body looks like

<body class="tag-name-contenttype tag-value-policy tag-pair-contenttype-policy tri-layout " />

But on exported content it doesn't work because the body looks like this

<body class="export export-format-html export-engine-none">

Steps to Reproduce

  1. Add tag class specific styling in Custom HTML Head Content
  2. See that it works on page
  3. export to html
  4. now style wont work since tag classes are missing from body

Expected Behaviour

I would like the same tag classed to be applied on the exported body

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v25.05.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions