Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Div tag for whole page #5021

Open
2 tasks done
ani-6 opened this issue May 20, 2024 · 3 comments
Open
2 tasks done

Div tag for whole page #5021

ani-6 opened this issue May 20, 2024 · 3 comments

Comments

@ani-6
Copy link

ani-6 commented May 20, 2024

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • 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

@ssddanbrown
Copy link
Member

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.

@ani-6
Copy link
Author

ani-6 commented May 20, 2024

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.

@ssddanbrown
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants