github gravity-ui/markdown-editor v10.0.0

latest releases: v14.1.0, v14.0.3, v14.0.2...
9 months ago

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 of markdown-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: {},
    });

Features

  • feat!: use diplodoc/latex-extension instead of markdown-it-katex (#184) (80ad40f)

Bug Fixes

Don't miss a new markdown-editor release

NewReleases is sending notifications on new releases.