procourse / procourse-static-pages

Allows admins to create static pages in Discourse.
https://procourse.co
GNU General Public License v2.0
17 stars 14 forks source link

Javascript support #10

Open ahopkins opened 5 years ago

ahopkins commented 5 years ago

Are <script></script> tags supported?

<!DOCTYPE html>
<h1>Test</h1>
<div id="bucket">foo</div>
<script type="text/javascript">
document.querySelector("#bucket").innerHTML = "hello";
</script>
leog commented 4 years ago

+1, would love to run a script using Discourse javascript API like so:

<script type="text/discourse-plugin" version="0.8.18">
    const user = api.getCurrentUser();
    console.log(user.groups);
</script>