How to use @digabi/mathquill - 1 common examples

To help you get started, we’ve selected a few @digabi/mathquill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github digabi / rich-text-editor / src / math-editor.js View on Github external
    updateMathImg = ($img, latex) => {
        const trimmed = trimLatex(latex)
            src: baseUrl + '/math.svg?latex=' + encodeURIComponent(trimmed),
            alt: trimmed
) {
    let updateMathImgTimeout

    if (firstTime) {
        MQ = MathQuill.getInterface(2)
    const $mathEditorContainer = $(`
        <div data-js="mathEditor" class="math-editor">
            <div data-js="equationField" class="math-editor-equation-field"></div>
            <textarea placeholder="LaTeΧ" data-js="latexField" class="math-editor-latex-field" rows="1"></textarea>

    const $latexField = $mathEditorContainer.find('[data-js="latexField"]')
    const $equationField = $mathEditorContainer.find('[data-js="equationField"]')
    let mqEditTimeout
    let visible = false
    let focusChanged = null
    //noinspection JSUnusedGlobalSymbols,JSUnusedLocalSymbols
    const mqInstance = MQ.MathField($equationField.get(0), {
        handlers: {


Easily type math in your webapp

Latest version published 5 months ago

Package Health Score

76 / 100
Full package analysis

Popular @digabi/mathquill functions

Similar packages