From 1309600e6545000cfae24119a91ea57cebda6256 Mon Sep 17 00:00:00 2001 From: Hrushikesh Vaidya Date: Fri, 26 Jan 2024 17:56:18 +0530 Subject: [PATCH] Added front matter to docs files --- docs/_config.yml | 16 +++++++++++++++- .../{head-custom.html => head_custom.html} | 0 docs/api/index.md | 6 ++++++ docs/index.md | 10 +++++++++- docs/media/favicon.png | Bin 0 -> 621 bytes 5 files changed, 30 insertions(+), 2 deletions(-) rename docs/_includes/{head-custom.html => head_custom.html} (100%) create mode 100644 docs/media/favicon.png diff --git a/docs/_config.yml b/docs/_config.yml index 1d73667..598cffc 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -5,4 +5,18 @@ theme: just-the-docs url: https://hrushikeshrv.github.io/mjxgui aux_links: - Repository: https://github.com/hrushikeshrv/mjxgui \ No newline at end of file + "MJXGUI on GitHub": https://github.com/hrushikeshrv/mjxgui + +enable_copy_code_button: true + +callouts: + warning: + title: Warning + color: red + note: + title: Note + color: purple + +ga_tracking: G-TGM5F6WJNV + +favicon_ico: "media/favicon.png" \ No newline at end of file diff --git a/docs/_includes/head-custom.html b/docs/_includes/head_custom.html similarity index 100% rename from docs/_includes/head-custom.html rename to docs/_includes/head_custom.html diff --git a/docs/api/index.md b/docs/api/index.md index e69de29..117df66 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -0,0 +1,6 @@ +--- +layout: default +title: API | MJXGUI Documentation +--- + +# API \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 46da475..de5ada2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,8 @@ +--- +layout: default +title: MJXGUI Documentation +--- + # What is MJXGUI? MJXGUI is a widget style application meant to give users a graphical interface for creating equations to use on the web. It uses MathJax as a core dependency and as an external renderer to show users a preview of their equation as they write it. Once users have created their equation, it generates corresponding LaTeX for it for you to handle however you would like, the most common use case being to store it as plain text, so you can use it later with MathJax. @@ -49,7 +54,10 @@ Also include the stylesheet for MJXGUI. Make sure you include the stylesheet bef # Usage MJXGUI works by showing your users a button/element prompting them to insert an equation. MJXGUI attaches event listeners to these elements and shows the editor UI when they are clicked. -Once the user is done entering the equation/expression, the editor UI disappears and a callback function that you supply is run. This callback function has access to the full internal API, from which you can access the generated LaTeX for the expression the user just entered. Make sure the callback function you supply is not an arrow function but a regular function. +Once the user is done entering the equation/expression, the editor UI disappears and a callback function that you supply is run. This callback function is where you can access the generated LaTeX for the expression the user just entered and handle however you need. The most common use case is to store it as LaTeX and/or render it on your page using MathJax. + +{: .note} +Make sure the callback function you supply is not an arrow function but a regular function. Initialize MJXGUI by creating a new MJXGUI instance, which takes 3 parameters - a CSS selector, a callback function, and an options object. diff --git a/docs/media/favicon.png b/docs/media/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..b57242d4dc105a87e931a28afaa41b99af56b00f GIT binary patch literal 621 zcmV-z0+RiSP)%oH7sMo_6#D3{9!g+frP)u`9&NF)+WEY%@@Bobi& z-UWce;egBK!g9HU)9JhbkW3~KjYhHG?_srC8E|(2kj-W>pU-hRoe+z~E>1ZZ44~8L z(C_yV3@-vB6PHk&~#79*Wbb80`+PXP1z{Ot@>DitP~=BZF9 zE&#OKZ5Rv&G@DISt5p;V1&Bl