New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

editorjs-math

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorjs-math - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/fonts/KaTeX_AMS-Regular.ttf

7

package.json
{
"name": "editorjs-math",
"version": "1.0.1",
"description": "Math Block for Editor.js (allow Tex syntax)",
"version": "1.0.2",
"description": "Math Block for Editor.js",
"main": "./dist/bundle.js",

@@ -32,3 +32,6 @@ "scripts": {

"style-loader": "^1.2.1"
},
"dependencies": {
"katex": "^0.13.0"
}
}
![](https://badgen.net/badge/Editor.js/v2.0/blue)
# Math Tool for Editor.js
This is a plugin for Editor.js. To use this package, you need to install [editorjs](https://www.npmjs.com/package/@editorjs/editorjs) first
![image](https://user-images.githubusercontent.com/51183663/86523997-4c787500-bea7-11ea-8f96-36b96d6ff96d.png)
Transform Tex syntax/plain text to pretty math equations
Based on mathJax and mathjs
Transform laTex text to pretty math equations
![image](https://user-images.githubusercontent.com/51183663/84605226-486fbd80-aece-11ea-9bc0-38c90cd8bc05.png)
Demo: https://flaming-cl.github.io/editorPlugin
This is a plugin for Editor.js. To use this package, you need to install [editorjs](https://www.npmjs.com/package/@editorjs/editorjs) first
Here are the supported functions: https://katex.org/docs/supported.html
### Install via NPM
Get the package
```shell
npm i --save-dev editorjs-math
```
Include module at your application
```javascript
const mathTex = require('editorjs-math');
// or import MathTex from 'editorjs-math';
```
### Load from CDN
```javascript
<script src="https://cdn.jsdelivr.net/npm/editorjs-math@1.0.2/dist/bundle.js"></script>
```
## Usage

@@ -21,4 +42,4 @@

...
Math: {
class: Math,
math: {
class: MathTex, // for CDN: window.MathTex
},

@@ -41,11 +62,12 @@ }

```json
Text can be plain text or Tex syntax($ can be omitted)
{
"type" : "math",
"data" : {
"text" : "sqrt(9 / 3) - cos(pi / 4)^2",
{
"type" : "math",
"data" : {
"text" : "\\{1,2,3,\\ldots ,n\\}",
}
}
}
```
## Credits
Katex: https://github.com/KaTeX/KaTeX

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc