ofdiceandmagic / FVTT-collapsible-journal-sections

All Headings, when clicked, will collapse all of the content in that section. Also adds a custom style in the journal that you can use to define sections that won't ever be collapsed. Also adds Map Note Linking. Add a heading's text to the Text Label field of the map note to highlight that section when you click the map note to open the entry.
MIT License
4 stars 1 forks source link

HTML & Heading linking #19

Open Tatonker opened 3 years ago

Tatonker commented 3 years ago

Hi,

Two questions if that's ok?

1) Does this work with HTML and div classes? If have some adventures that are written in HTML which is great as it has some really great formatting of things like text boxes / speech boxes etc... but the module doesn't appear to accept div classes and span classes. Is there scope for this at all?

2) Is it possible to use the heading links without having any of the collapsible journal formatting? i.e can you turn off the collapsiing element and still have heading linking?

Thanks, really love the idea of this module and working hard to get my game up and running.

Tatonker

ofdiceandmagic commented 3 years ago
  1. I'm going to look into this further. Can you send me the html of an example you want functionality for? I don't see why it shouldn't work on divs or spans.

  2. As of now, no it's not possible. If there's more interest in this feature I'll look into adding it.

Tatonker commented 3 years ago

That sounds great, thanks.

Here's an extract that you can look over. The headers are all identified by something like this:

I3. Nass Lantomir's Ghost [sample.txt](https://github.com/ofdiceandmagic/FVTT-collapsible-journal-sections/files/6658384/sample.txt)
epicmusic42 commented 3 years ago

Adding in class="cjs-collapsible" to headers in the HTML editor, fixes the <div> issue. Presumably there's something that is preventing the module from applying the classes to headers inside divs