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

Some headings not displaying at all #18

Closed adacosta92 closed 3 years ago

adacosta92 commented 3 years ago

How it looks with the module on: image How it should look: chrome_0IlmjfoR7U The HTML in the table:


<h1>Description</h1>
</section>
<p>Humming as she traces her fingers over an ancient monument in a long-forgotten ruin, a half-elf in rugged leathers finds knowledge springing into her mind, conjured forth by the magic of her song&mdash;knowledge of the people who constructed the monument and the mythic saga it depicts.</p>
<p>A stern human warrior bangs his sword rhythmically against his scale mail, setting the tempo for his war chant and exhorting his companions to bravery and heroism. The magic of his song fortifies and emboldens them.</p>
<p>Laughing as she tunes her cittern, a gnome weaves her subtle magic over the assembled nobles, ensuring that her companions&rsquo; words will be well received.</p>
<p>Whether scholar, skald, or scoundrel, a bard weaves magic through words and music to inspire allies, demoralize foes, manipulate minds, create illusions, and even heal wounds.</p>
<h2>Music and Magic</h2>
<p>In the worlds of D&amp;D, words and music are not just vibrations of air, but vocalizations with power all their own. The bard is a master of song, speech, and the magic they contain. Bards say that the multiverse was spoken into existence, that the words of the gods gave it shape, and that echoes of these primordial Words of Creation still resound throughout the cosmos. The music of bards is an attempt to snatch and harness those echoes, subtly woven into their spells and powers.</p>
<p>The greatest strength of bards is their sheer versatility. Many bards prefer to stick to the sidelines in combat, using their magic to inspire their allies and hinder their foes from a distance. But bards are capable of defending themselves in melee if necessary, using their magic to bolster their swords and armor. Their spells lean toward charms and illusions rather than blatantly destructive spells. They have a wide-ranging knowledge of many subjects and a natural aptitude that lets them do almost anything well. Bards become masters of the talents they set their minds to perfecting, from musical performance to esoteric knowledge.</p>
<h2>Learning from Experience</h2>
<p>True bards are not common in the world. Not every minstrel singing in a tavern or jester cavorting in a royal court is a bard. Discovering the magic hidden in music requires hard study and some measure of natural talent that most troubadours and jongleurs lack. It can be hard to spot the difference between these performers and true bards, though. A bard&rsquo;s life is spent wandering across the land gathering lore, telling stories, and living on the gratitude of audiences, much like any other entertainer. But a depth of knowledge, a level of musical skill, and a touch of magic set bards apart from their fellows.</p>
<p>Only rarely do bards settle in one place for long, and their natural desire to travel&mdash;to find new tales to tell, new skills to learn, and new discoveries beyond the horizon&mdash;makes an adventuring career a natural calling. Every adventure is an opportunity to learn, practice a variety of skills, enter long-forgotten tombs, discover lost works of magic, decipher old tomes, travel to strange places, or encounter exotic creatures. Bards love to accompany heroes to witness their deeds firsthand. A bard who can tell an awe-inspiring story from personal experience earns renown among other bards. Indeed, after telling so many stories about heroes accomplishing mighty deeds, many bards take these themes to heart and assume heroic roles themselves.</p>
<h1>Creating a Bard</h1>
<p>Bards thrive on stories, whether those stories are true or not. Your character&rsquo;s background and motivations are not as important as the stories that he or she tells about them. Perhaps you had a secure and mundane childhood. There&rsquo;s no good story to be told about that, so you might paint yourself as an orphan raised by a hag in a dismal swamp. Or your childhood might be worthy of a story. Some bards acquire their magical music through extraordinary means, including the inspiration of fey or other supernatural creatures.</p>
<p>Did you serve an apprenticeship, studying under a master, following the more experienced bard until you were ready to strike out on your own? Or did you attend a college where you studied bardic lore and practiced your musical magic? Perhaps you were a young runaway or orphan, befriended by a wandering bard who became your mentor. Or you might have been a spoiled noble child tutored by a master. Perhaps you stumbled into the clutches of a hag, making a bargain for a musical gift in addition to your life and freedom, but at what cost?</p>
<blockquote>
<p>QUICK BUILD</p>
<p>You can make a bard quickly by following these suggestions. First, Charisma should be your highest ability score, followed by Dexterity. Second, choose the entertainer background. Third, choose the dancing lights and vicious mockery cantrips, along with the following 1st-level spells: charm person, detect magic, healing word, and thunderwave.</p>
</blockquote>
<h3>Primary Ability: Charisma</h3>
<h3>Proficiencies</h3>
<p>Armor: Light armor</p>
<p>Weapons: Simple weapons, hand crossbows, longswords, rapiers, shortswords</p>
<p>Tools: Three musical instruments of your choice</p>
<p>Saving Throws: Dexterity, Charisma</p>
<p>Skills: Choose any three</p>
<h3>Equipment</h3>
<p>You start with the following equipment, in addition to the equipment granted by your background:5</p>
<ul>
<li>(a) a @Compendium[communaldata.items.t21g0L1peEkjtqiY]{Rapier}, (b) a @Compendium[communaldata.items.XU6AKiOR28iOmaG2]{Longsword}, or (c) any @Compendium[communaldata.phb.D7VojuIW6lZ8bM7g]{Simple Melee Weapon} or (d) any @Compendium[communaldata.phb.iTph5EjZzplssA1B]{Simple Ranged Weapon}</li>
<li>(a) a @Compendium[communaldata.items.GMsvIPipt7bjRowD]{Diplomat's Pack} or (b) an @Compendium[communaldata.items.SIPlF2aMs7tBBuH8]{Entertainer's Pack }</li>
<li>(a) a @Compendium[communaldata.items.jicIeH13Jh0swFzG]{Lute} or (b) any other @Compendium[communaldata.phb.7O8iDYrlVrx4Ac1a]{Musical Instrument}</li>
<li>@Compendium[communaldata.items.JqcmZCYqy5aMIy41]{Leather armor} and a @Compendium[communaldata.items.IA6HsykJpyooJmrb]{Dagger}</li>
</ul>
<h3>The Bard Table</h3>
<table>
<thead>
<tr>
<th rowspan="2">
<p>Level</p>
</th>
<th rowspan="2">
<p>Proficiency<br />Bonus</p>
</th>
<th rowspan="2">
<p>Features</p>
</th>
<th rowspan="2">
<p>&nbsp;Cantrips&nbsp;<br />&nbsp;Known&nbsp;</p>
</th>
<th rowspan="2">
<p>&nbsp;Spells&nbsp;<br />&nbsp;Known&nbsp;</p>
</th>
<th colspan="9">
<p>&mdash;Spell Slots per Spell Level&mdash;</p>
</th>
</tr>
<tr>
<th>
<p>1st</p>
</th>
<th>
<p>2nd</p>
</th>
<th>
<p>3rd</p>
</th>
<th>
<p>4th</p>
</th>
<th>
<p>5th</p>
</th>
<th>
<p>6th</p>
</th>
<th>
<p>7th</p>
</th>
<th>
<p>8th</p>
</th>
<th>
<p>9th</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>1st</p>
</td>
<td>
<p>+2</p>
</td>
<td>
<p>Spellcasting,&nbsp;Bardic Inspiration&nbsp;(d6)</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>2nd</p>
</td>
<td>
<p>+2</p>
</td>
<td>
<p>Jack of All Trades,&nbsp;Song of Rest&nbsp;(d6)</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>5</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>3rd</p>
</td>
<td>
<p>+2</p>
</td>
<td>
<p>Bard College,&nbsp;Expertise</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>6</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>4th</p>
</td>
<td>
<p>+2</p>
</td>
<td>
<p>Ability Score Improvement</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>7</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>5th</p>
</td>
<td>
<p>+3</p>
</td>
<td>
<p>Bardic Inspiration&nbsp;(d8),&nbsp;Font of Inspiration</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>8</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>6th</p>
</td>
<td>
<p>+3</p>
</td>
<td>
<p>Countercharm,&nbsp;Bard College Feature</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>9</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>7th</p>
</td>
<td>
<p>+3</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>10</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>8th</p>
</td>
<td>
<p>+3</p>
</td>
<td>
<p>Ability Score Improvement</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>11</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>9th</p>
</td>
<td>
<p>+4</p>
</td>
<td>
<p>Song of Rest&nbsp;(d8)</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>12</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>10th</p>
</td>
<td>
<p>+4</p>
</td>
<td>
<p>Bardic Inspiration&nbsp;(d10),&nbsp;Expertise,&nbsp;Magical Secrets</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>14</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>11th</p>
</td>
<td>
<p>+4</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>15</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>12th</p>
</td>
<td>
<p>+4</p>
</td>
<td>
<p>Ability Score Improvement</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>15</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>13th</p>
</td>
<td>
<p>+5</p>
</td>
<td>
<p>Song of Rest&nbsp;(d10)</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>16</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>14th</p>
</td>
<td>
<p>+5</p>
</td>
<td>
<p>Magical Secrets,&nbsp;Bard College Feature</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>18</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>15th</p>
</td>
<td>
<p>+5</p>
</td>
<td>
<p>Bardic Inspiration&nbsp;(d12)</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>19</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>16th</p>
</td>
<td>
<p>+5</p>
</td>
<td>
<p>Ability Score Improvement</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>19</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>&mdash;</p>
</td>
</tr>
<tr>
<td>
<p>17th</p>
</td>
<td>
<p>+6</p>
</td>
<td>
<p>Song of Rest&nbsp;(d12)</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>20</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
</tr>
<tr>
<td>
<p>18th</p>
</td>
<td>
<p>+6</p>
</td>
<td>
<p>Magical Secrets</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>22</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
</tr>
<tr>
<td>
<p>19th</p>
</td>
<td>
<p>+6</p>
</td>
<td>
<p>Ability Score Improvement</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>22</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
</tr>
<tr>
<td>
<p>20th</p>
</td>
<td>
<p>+6</p>
</td>
<td>
<p>Superior Inspiration</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>22</p>
</td>
<td>
<p>4</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>3</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>2</p>
</td>
<td>
<p>1</p>
</td>
<td>
<p>1</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>```
ofdiceandmagic commented 3 years ago

Hi, thanks for being this to my attention!

Do you have any other modules active that edit Journal entries?

If so, does this still happen when they are disabled?

adacosta92 commented 3 years ago

I don't have any other modules that affect journal entries, though I did remove the [x] from the CSS sheet of this module (looks cleaner) That first screenshot is with ONLY cjs active

ofdiceandmagic commented 3 years ago

Okay, I see the problem. Currently, Left Clicking to expand the section shows 'immediate subheadings' (h2 is an immediate subheading of h1) and hides all other subheadings. I failed to take into account that people may skip over immediate subheadings. I'm going to start working on this. For now you can Right Click on a header to expand the entire section.

On Tue, Jun 15, 2021 at 8:17 AM adacosta92 @.***> wrote:

I don't have any other modules that affect journal entries, though I did remove the [x] from the CSS sheet of this module (looks cleaner) That first screenshot is with ONLY cjs active

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ofdiceandmagic/FVTT-collapsible-journal-sections/issues/18#issuecomment-861449389, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQZNRHFP3FPCWQXUNPPMKU3TS5AG3ANCNFSM46V4PPZA .

ofdiceandmagic commented 3 years ago

This has been fixed in v 1.3.1