Skip to content

How to import custom components? #248

Answered by jourdain
m-vik asked this question in Q&A
Discussion options

You must be logged in to vote

Not tested but the basic gist could be like

server.enable_module({
   scripts: ["https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_HTML"],
})

with layout.content as container:
    html.TextArea(v_model=("formula", "$$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}.$$"), cols=30, rows=10)
    container.add_child('<vue-mathjax :formula="formula" />')

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jourdain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants