Skip to content

Creating custom embedded objects #60

@asianvader

Description

@asianvader

Hello,
I'm currently converting an old project from JavaScript/jQuery to React/Typescript and I have custom embedded objects (https://docs.mathquill.com/en/latest/Api_Methods/#registerembedname-functionid-return-options-x). I don't know if I can access the .registerEmbed method using the react-mathquill wrapper? This was an experimental MathQuill feature.

Here's an example of the implementation from the old project:

MQ.registerEmbed("br", function registerBr() {
    return {
      htmlString: `<div class="mq-br"></div>`,       
      text: function text() {
        return "mq_br";
      },
      latex: function latex() {
        return "\\mqBr";
      },
    }
  });

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions