HTML Styles and Measurements in ProseMirror


#1

Hi all,

we are developing a scripting editor, based on Prosemirror. We have in a JSON file, saved in the form of ProseMirror Attributes, a list of Styles (each style is per Node Type). Each style contains multiple elements:

  • FontSize
  • FontName
  • PaddingLeft
  • etc…

So my questions are: Which measurement is best to use in case we will be editing scripts (and printing them out) : so em/pt/px/in…

And then which is the best way to apply styles in Prosemirror? (currently we are trying to include the style inline, in the HTML style attribute in the schema, but is that the best approach?)