Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating custom embedded objects #60

Open
asianvader opened this issue Sep 12, 2023 · 0 comments
Open

Creating custom embedded objects #60

asianvader opened this issue Sep 12, 2023 · 0 comments

Comments

@asianvader
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant