I am logged in, and I do have the proper content type set, like I said, other than the typo nothing has changed. However I do notice something odd, when I first load the macro it does have the right content type selected, but the syntax highlighting looks like the Motescript syntax highlighting. If I toggle it from HTML/JS and then back to HTML/JS it recognizes the content type and highlights the syntax properly. However every time I close and re-open the macro it reverts to MoteScript style syntax highlighting despite still claiming that it's an HTML/JS macro.
I thought that the issue might be with the existing macro buttons, so I made new ones and copied the scripts over, but the button still fails to render as an actual button. The issue persists in both my actual campaign, my test campaign, and a brand new campaign freshly made. I've attached a screenshot of that last test case, both the result I get, and the entire view of my Macro Editor window. Also, just to verify that it actually knows I'm logged in, I tried to run a simple client.tell() in a JS macro and that does print to console.
As for your responses to the questions I asked...
1. Awesome.
2. Also awesome.
3. I'll be honest, I'm still not sure I totally understand the answer here, especially since this answer seems to conflict with answer for #1.
So I can use <script> tags, and I can write JS directly within those script tags that will run/be called in the HTML below. But it needs to be vanilla JS, I can't use the Mote specific JS methods? That also means that I can't use macro.command() to call true JS macros that themselves contain Mote specific JS methods, or to call MoteScript macros, correct?
So if I wanted to get data from an XML macro and have it end up in an HTML window on the page I could not:
Create an HTML macro, and within that macro use <script> tags to access the XML via macro.command() and then parse it. OR Create an HTML button that calls any Mote specific JS or MoteScript.
But I could:
Create a JS macro, and within that macro use macro.command() to access the XML, parse it, and then use window.make() to create the HTML window. And if I wanted to do any DOM manipulation in the window I'd need to use window.update() from the JS macro?
Basically, if I want HTML and Motescript/Mote specific JS to live in the same world, I need the a JS macro to be in charge, not the HTML macro?
I'd try to test some of those examples before bothering you about them, but JS/HTML macros don't seem to be entirely behaving themselves for me right now. On the other hand, MoteScript macros are fine, and I've been testing something like what I described above, but with MoteScript rather than HTML/JS. I always ran into memory issues when I tried it with the questionably sound Maptool parser, but despite my best efforts I cannot get the Mote parser to break. So it looks like I'll be able assemble my crazy character sheet macro with the existing functionality, rather than expecting you guys to work yourselves to death to fill a niche use case :P