Skip to content

Math Block for Editor.js (allow Tex syntax)

License

Notifications You must be signed in to change notification settings

brc-dd/editorjs-math

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math Tool for Editor.js

image

Transform laTex text to pretty math equations

Demo: https://flaming-cl.github.io/editorPlugin
This is a plugin for Editor.js. To use this package, you need to install editorjs first
Here are the supported functions: https://katex.org/docs/supported.html

Usage

Add a new Tool to the tools property of the Editor.js initial config.

var editor = EditorJS({
  ...
  
  tools: {
    ...
    Math: {
      class: Math,
    },
  }
  
  ...
});

Config Params

This Tool has no config params

Output data

Field Type Description
text string Math text
  {
        "type" : "math",
        "data" : {
            "text" : "\\{1,2,3,\\ldots ,n\\}",
        }
    }

Credits

Katex: https://github.com/KaTeX/KaTeX

About

Math Block for Editor.js (allow Tex syntax)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • JavaScript 84.2%
  • CSS 15.8%