{"id":13565657,"url":"https://github.com/mdgaziur/EditorJS-LaTeX","last_synced_at":"2025-04-03T23:30:27.701Z","repository":{"id":57219623,"uuid":"294819225","full_name":"mdgaziur/EditorJS-LaTeX","owner":"mdgaziur","description":"LaTeX block support for EditorJS","archived":false,"fork":false,"pushed_at":"2024-03-01T09:52:35.000Z","size":503,"stargazers_count":40,"open_issues_count":1,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T04:51:09.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mdgaziur.github.io/EditorJS-LaTeX/example","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdgaziur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-11T21:53:40.000Z","updated_at":"2025-03-11T20:23:55.000Z","dependencies_parsed_at":"2024-06-19T04:13:00.725Z","dependency_job_id":"921a9313-6825-409f-bc3b-10821405590f","html_url":"https://github.com/mdgaziur/EditorJS-LaTeX","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":0.36,"last_synced_commit":"b4c6418a2c121d62296babba2244ec05189a3d08"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgaziur%2FEditorJS-LaTeX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgaziur%2FEditorJS-LaTeX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgaziur%2FEditorJS-LaTeX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgaziur%2FEditorJS-LaTeX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdgaziur","download_url":"https://codeload.github.com/mdgaziur/EditorJS-LaTeX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097538,"owners_count":20883121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:52.269Z","updated_at":"2025-04-03T23:30:26.021Z","avatar_url":"https://github.com/mdgaziur.png","language":"JavaScript","funding_links":[],"categories":["Tools","JavaScript"],"sub_categories":["Block Tools"],"readme":"# EditorJS-LaTeX\n[![](https://data.jsdelivr.com/v1/package/gh/mdgaziur/EditorJS-LaTeX/badge)](https://www.jsdelivr.com/package/gh/mdgaziur/EditorJS-LaTeX)\nCheck the example: https://mdgaziur.github.io/EditorJS-LaTeX/example\n\n\n### LaTeX block support for EditorJS\n### Created By: MD Gaziur Rahman Noor\n\n![Screenshot of EditorJS-LaTeX](./screenshot.png)\n\n## Setting Up\nAdd the following code inside the ```\u003chead\u003e``` tag.\n\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@editorjs/editorjs@2.19.0/dist/editor.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/mdgaziur/EditorJS-LaTeX@latest/dist/editorjs-latex.bundle-min.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/mdgaziur/EditorJS-LaTeX@latest/dist/editorjs-latex.bundle.min.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css\"\u003e\u003c/link\u003e\n```\nTo use with nodejs simply run ```npm i editorjs-latex``` and import using the following code:\n```javascript\nconst EJLaTeX = require('editorjs-latex');\n```\n\n\nTo add this library to EditorJS, simply add the follwing code:\n\n```javascript\ntools: {\n        Math: {\n        class: EJLaTeX,\n        shortcut: 'CMD+SHIFT+M'\n    }, ...\n}\n```\n\nIf you need to adjust the theming of the editor, you can add CSS rules in the config like:\n\n```javascript\ntools: {\n        Math: {\n        class: EJLaTeX,\n        shortcut: 'CMD+SHIFT+M',\n        config: {\n            css: '.math-input-wrapper { padding: 5px; }'\n        }\n    }, ...\n}\n```\n\n## Getting data\nThe output data of this plugin will look like bellow:\n\n```json\n{\n    \"type\" : \"Math\",\n    \"data\" : {\n        \"math\" : \"\\\\frac{a \\\\pm b}{(a+b)^2}\"\n    }\n}\n```\n\nThe \"math\" item contains the expression. You can use KaTeX to render that in your document.\n\n\n## Conclusion\nIf there is any problem or bugs, create an issue in this repository. I'll try my best to help you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgaziur%2FEditorJS-LaTeX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdgaziur%2FEditorJS-LaTeX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgaziur%2FEditorJS-LaTeX/lists"}