BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Div tag for whole page

Open ani-6 opened this issue 1 year ago • 3 comments

Attempted Debugging

  • [X] I have read the debugging page

Searched GitHub Issues

  • [X] I have searched GitHub for the issue.

Describe the Scenario

I'm trying to wrap the entire content of a page inside a div tag to apply styles. However, when I edit the source code and save the page, the div tag disappears. Do we have any workaround for this? Thanks in advance for your help...

Exact BookStack Version

v24.05

Log Content

No response

Hosting Environment

Docker on Ubuntu 22.04

ani-6 avatar May 20 '24 05:05 ani-6

There's a lot that the editor will filter out or prevent in an attempt to keep content simple and standard. We don't (and likely won't) provide official additional controls for this. If you have an example of what you're attempting to do I may be able to find an alternative method/suggestion.

ssddanbrown avatar May 20 '24 10:05 ssddanbrown

Screenshot_20240520_161710_Firefox

I am trying to do something like this so i can apply styles to that specific portion. But after saving its turning like this.

Screenshot_20240520_161738_Firefox

It works perfectly fine if I enclose a or figure tag inside div.

ani-6 avatar May 20 '24 11:05 ani-6

For something like that you'd need to get inventive, and use something like:

<style>
#bkmrk-this-page-is-marked-,
#bkmrk-this-page-is-marked-+hr,
#bkmrk-this-page-is-marked-+hr+h3 {
  color: red;
}
</style>

There is also tag classes that can help target customizations to specific pages using tags applied the the page: https://www.bookstackapp.com/docs/admin/hacking-bookstack/#tag-classes

ssddanbrown avatar May 20 '24 11:05 ssddanbrown