v10.0.0
10.0.0 (2024-02-06)
⚠ BREAKING CHANGES
- feat!: use diplodoc/latex-extension instead of markdown-it-katex (#184)
- added packages to peerDependencies:
@diplodoc/latex-extension
,katex
,markdown-it
- editor's Math extension now use
@diplodoc/latex-extension
instead ofmarkdown-it-katex
- Math extension removed from YfmPreset/YfmSpecsPreset and package root export
- added options to Math extension
Example of using a Math extension:
import {Math} from '@doc-tools/yfm-editor/_/extensions/yfm/Math'; // ... builder.use(Math, { // required loadRuntimeScript: async () => { await Promise.all([ import('@diplodoc/latex-extension/runtime'), import('@diplodoc/latex-extension/runtime/styles'), ]); }, // optional; if you need custom sanitizing sanitize: (html) => /* sanitize html */ html, // optional; options to be passed to katex katexOptions: {}, });
- added packages to peerDependencies: