mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

[FEATURE] Chemical equation editor

Open Tanzz1058 opened this issue 3 years ago • 3 comments

Description

[Describe the bug or feature]

Any chemistry related content like isotopes, equations, molecular formula etc. is not editable in the math editor.

Steps to Reproduce

  1. Navigate to https://cortexjs.io/mathlive/demo/
  2. Type in any chemical formula or equation using the latex editor
  3. Try editing the contents using the math editor

Actual Behavior

The cursor does not move to expected locations to edit the content

Expected Behavior

The contents should be editable and cursor should move to let the user edit the equations/ formulae

Browser
Chrome

Tanzz1058 avatar Jun 07 '22 10:06 Tanzz1058

Editing or creating entire chemical formulas is currently not supported. This would be a great feature to contribute, though, if there is enough interest. It would require a new editing mode, different from the existing text and math modes, with specific keyboard shortcuts, a custom virtual keyboard, and a custom serializer.

arnog avatar Jun 07 '22 16:06 arnog

@arnog Can you provide any insights into this modification? We also aim to implement the functionality for chemical equations, and things like the keyboard are not crucial; the editor is the most essential part. However, we haven't yet figured out a specific approach for the modification. Thank you!

LatoAndroid avatar Dec 29 '23 06:12 LatoAndroid

This would probably involve creating a subclass of the Mode abstract class, along with a set of subclasses of the Atom abstract class representing the different kind of atoms (in the context of MathLive, not in the context of chemistry) that can be included in a chemical equation.

arnog avatar Dec 29 '23 16:12 arnog