Skip to content

Creating custom embedded objects #60

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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