react mathquill npm - boostcamp-2020/Project15-A-Client-Based-Formula-Editor GitHub Wiki
react-mathquill - npm
react-mathquill npm 곡μλ¬Έμ λ°λ‘κ°κΈ°
MathQuill 곡μλ¬Έμ λ°λ‘κ°κΈ°
π οΈ νμν κ² κ°μ API Methods μ 리
.latex()
: Returns the contents as LaTeX.
β ex) mathField.latex() : νλ©΄μμ μ λ ₯λ°μ λ΄μ©μ LaTeXμΌλ‘ λ³ν
.focus()
: Puts the focus on the editable field..blur()
: Removes focus from the editable field..write(latex_string)
: Write the given LaTeX at the current cursor position..cmd(latex_string)
: Enter a LaTeX command at the current cursor position.
β If the cursor does not have focus, writes to last position the cursor occupied in the editable field.
moveToLeftEnd()
: Move the cursor to the left/right end of the editable fieldmoveToRightEnd()
: Move the cursor to the left/right end of the editable field.keystroke(keys)
: Simulates keystrokes given a string like "Ctrl-Home Del"
β ex) mathField.keystroke('Shift-Left'); // Selects character before the current cursor position
typedText(text)
: Simulates typing text
β ex) mathField.typedText('x=-b\pm \sqrt b^2 -4ac');