prosemirror-math icon indicating copy to clipboard operation
prosemirror-math copied to clipboard

Support Preview Pane for Block Math

Open benrbray opened this issue 4 years ago • 1 comments

Resolves #28.

  • Display math now shows a preview pane. Inline math previews may be supported in the future.
  • It should be fairly simple to adjust the appearance of the preview pane with CSS.
  • Added an initialText parameter to insertMathCmd

Breaking Changes

  • Added new isBlockMath argument to MathView constructor
  • mathPlugin and mathPluginSpec are now functions that accept an options parameter
  • The mathPlugin state now has an extra flag indicating whether previews are enabled

TODOs:

  • [ ] Investigate whether inline previews can be trivially added (e.g. via CSS) or whether they should be added in a separate PR.
  • [ ] Update the docs site with a checkbox to enable/disable previews?
  • [ ] Better error reporting when preview is active?

benrbray avatar Aug 23 '21 15:08 benrbray

I think it's better to have the inline previews in a separate PR, since there's no common things with block preview IMO.

Saul-Mirone avatar Sep 08 '21 15:09 Saul-Mirone