Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G g1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 68
    • Issues 68
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cto
  • g1
  • Issues
  • #4

Closed
Open
Created Jan 04, 2018 by S Anand@s.anandOwner

$.template() can render multiple languages

Scripts with different types have different meanings

  • type="text/html" renders as HTML in-place
  • type="text/plain" renders as text, i.e. set the innerText, not innerHTML
  • type="text/markdown" - Markdown
  • type="text/vega" - Vega
  • type="text/vega-lite" - Vega-lite
  • type="text/plotly" - Plotly
  • type="text/echarts" - echarts
  • type="text/mermaid"- mermaid graph
  • type="text/flowchart" - flowchart
  • type="text/js-sequence" - js-sequence
  • etc.

Implementation:

  • Each works as a plugin that can be registered independently, and can be extended. text/html will use _.template for example.
  • To allow use of </script> tags for code examples, the container can be <template> instead of <script>
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking