Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pagedjs
pagedjs
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 154
    • Issues 154
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Tools
  • pagedjspagedjs
  • Issues
  • #138

Closed
Open
Opened Sep 25, 2019 by Arthur Attwell@arthurattwell
  • Report abuse
  • New issue
Report abuse New issue

Parse attributes on body element

As discussed on the Paged Media Mattermost here, pagedjs parses the inner HTML of the <body> element. This means that it is not aware of attributes on the body.

Is it possible to change this, either so that pagedjs parses the outer HTML of the body, or that pagedjs somehow reads and applies the attributes on the body, such as classes?

In our use case, we use classes on the body extensively in books made up of separate HTML documents. For instance, a copyright page will have <body class="copyright-page"> and a chapter will have <body class="chapter">. Mostly, this informs our @page rules for controlling page numbering and other margin-box features.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: tools/pagedjs#138