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

Add support for LaTeX rendering using KaTex rendering engine #145

Closed
kutenai opened this issue Mar 29, 2018 · 2 comments
Closed

Add support for LaTeX rendering using KaTex rendering engine #145

kutenai opened this issue Mar 29, 2018 · 2 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@kutenai
Copy link

kutenai commented Mar 29, 2018

Do you want to request a feature or report a bug?
Request a feature

What is the current behavior?
No support for LaTeX type markup, as implemented by
https://github.com/Khan/KaTeX

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. GIFs and screenshots are very helpful too.
There is just no support as I understand it.

What is the expected behavior?
Add the ability to (optionally) include KaTex support, so that character sequences like this:
$f(x) = \int_{-\infty}^\infty
\hat f(\xi),e^{2 \pi i \xi x}
,d\xi$

would be rendered as math.

Which versions of Draftail + Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draftail or Draft.js?
This is a future feature request.

@kutenai
Copy link
Author

kutenai commented Mar 29, 2018

I did find that there is a KaTex Plugin for Draft.js..
https://www.npmjs.com/package/draft-js-katex-plugin

This would presumably help get things started.

@thibaudcolas
Copy link
Collaborator

Hey @kutenai, thank you for taking the time to file this.

Draftail only provides built-in support for very basic formatting (headings, lists, bold, italic and so on – see the full list in the docs). I think keeping this list as short as possible is good, and including KaTeX support would go against that. Generally, if a rich text format can map directly to a given HTML element without any further attributes, CSS or JS, it's a good fit to be built-in. Otherwise it's too complex.

Luckily it should be possible to implement KaTeX support as a third-party plugin, with the custom entities APIs.

@thibaudcolas thibaudcolas added enhancement New feature or request wontfix This will not be worked on labels Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants