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

Set caret inside chemical expression in Mathjax #1763

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

hgiesel
Copy link
Contributor

@hgiesel hgiesel commented Mar 31, 2022

Closes #1687

.map(Number) as [number, number];
}

this.component.moveCaretAfter(position);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The separate hasAttribute/getAttribute and force unwrapping is unfortunate, but that's an issue with the DOM/Javascript rather than your code. I really miss optional types!

I continue to be impressed with how smooth this MathJax preview feature is - it feels great, and I think users will love it. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It even exists in Svelte with hasContext and getContext ^^;
A relevant Typescript ticket: microsoft/TypeScript#13086

@dae dae merged commit 67c1f73 into ankitects:main Mar 31, 2022
@hgiesel hgiesel deleted the mathjaxeditor5 branch March 31, 2022 13:46
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

Successfully merging this pull request may close these issues.

MathJax chem places cursor at end
2 participants