Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Discourse JS plugin syntax highlighting (HTML)New to Visual Studio Code? Get it now.
Discourse JS plugin syntax highlighting (HTML)

Discourse JS plugin syntax highlighting (HTML)

zcuric

|
1,115 installs
| (0) | Free
Syntax highlighting support for HTML `<script>` tags using `type=text/discourse-plugin` which is actually javascript.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

discourse-plugin-syntax-highlighting

Syntax highlighting support for HTML <script> tags using type=text/discourse-plugin which is actually javascript.

For example

<script type="text/discourse-plugin">
  const settings = Discourse.SiteSettings,
    taggingEnabled = settings.tagging_enabled,
    title = settings.title;

  if (taggingEnabled) {
    console.log("Yay! "+title+" has tagging enabled!")
  } else {
    console.log("Ohh nooos! "+title+"Does not allow tagging.")
  }
</script>

More on discourse theme plugin development here.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft