Unable to see image in Opening Crawl feature
Closed this issue · 11 comments
Does it work if you don't edit the file at all? Are you using Forge or another hosting service, by any chance?
Can you open up the web developer tools and see if any errors show up in the console while running?
Could you also include a copy of the HTML of the Journal by clicking the <>
button and posting it into this issue?
@wrycu Yes, I'm using Forge. Same problem if not editing the default file at all. I will try on the standalone app in just a bit (on different computer right now)
Just tested on self-hosted standalone. Worked as expected. So it's either a Forge issue or a Forge + me issue.
@bheiskell HTML is below. Doesn't seem to be throwing any errors:
Episode I
The Traitor's Gambit
It is a dark time in the galaxy. The evil Galactic Empire has spread from the Deep Core to the Outer Rim, and everywhere the Empire’s tyranny can be felt. Fleeing from the oppression of the Emperor’s minions, agents of Senator Bail Organa have run to a remote space station above Brentaal. Known to be a vocal opponent of the Empire, Organa may be the last hope of freedom in the galaxy. In the hopes of stopping these dissidents before they can reach the Senator, the Empire has alerted its forces on Sel Zonn Station, where the struggle for liberty rages on, and the first sparks of rebellion have begun to burn. . . .
If you remove the following from the html does it start working again?
<span class="Apple-converted-space"> </span>
No luck. Here is the html now:
Episode I
The Traitor's Gambit
It is a dark time in the galaxy. The evil Galactic Empire has spread from the Deep Core to the Outer Rim, and everywhere the Empire’s tyranny can be felt. Fleeing from the oppression of the Emperor’s minions, agents of Senator Bail Organa have run to a remote space station above Brentaal. Known to be a vocal opponent of the Empire, Organa may be the last hope of freedom in the galaxy. In the hopes of stopping these dissidents before they can reach the Senator, the Empire has alerted its forces on Sel Zonn Station, where the struggle for liberty rages on, and the first sparks of rebellion have begun to burn...
Absolutely.
<h2>The Traitor's Gambit</h2>
<p>It is a dark time in the galaxy. The evil Galactic Empire has spread from the Deep Core to the Outer Rim, and everywhere the Empire’s tyranny can be felt. Fleeing from the oppression of the Emperor’s minions, agents of Senator Bail Organa have run to a remote space station above Brentaal. Known to be a vocal opponent of the Empire, Organa may be the last hope of freedom in the galaxy. In the hopes of stopping these dissidents before they can reach the Senator, the Empire has alerted its forces on Sel Zonn Station, where the struggle for liberty rages on, and the first sparks of rebellion have begun to burn...</p>
<img src="https://assets.forge-vtt.com/63d15222404dcbbf2ad08ce7/worlds/dawn/images/Starbasecarida.jpg">```
I don't know why yet, but the template being created is wrong.
This is what's created in my live environment:
<h1>Episode X</h1>
<h2>Episode Title</h2>
<p>Replace the h1 and h2 above with your episode and title. Then, replace this block of text with the paragraphs of your opening crawl. Lastly, the opening crawl will pan to the image below. Replace the image with a planet, ship, or simply remove the image entirely to pan to open space.</p>
<img src="modules/ffg-star-wars-enhancements/artwork/planet.png">
But the actual template used in the code is:
"content": "<h1>Episode X</h1><h2>Episode Title</h2><p>Replace the h1 and h2 above with your episode and title. Then, replace this block of text with the paragraphs of your opening crawl. Lastly, the opening crawl will pan to the image below. Replace the image with a planet, ship, or simply remove the image entirely to pan to open space.</p><p><img src=\"modules/ffg-star-wars-enhancements/artwork/planet.png\"/></p>",
You can see the image in the template is wrapped with a paragraph tag. I'm guessing some sort of auto-reformatting is happening. When I try to manually fix it, the image moves out of the paragraph tag, leaving an empty one. This is likely some new post-save processing done by foundry. We can fix this in the main code, but unfortunately, I don't have a work around for you as the img extraction specifically looks for a paragraph tag with an img in it.
Thanks so much! Really appreciate the explanation and the time spent on this (and glad to know I'm not completely inept at following your instructions). Love the mod, as do my players.