Fair-Strides / FVTT-Custom-Journal-Theming

A Foundry VTT module to allow for custom theming of journal entries.
MIT License
3 stars 1 forks source link

options.style_formats should inherit CONFIG.TinyMCE.style_formats #3

Closed farling42 closed 1 year ago

farling42 commented 2 years ago

My own module (https://github.com/farling42/fvtt-import-realmworks/blob/master/scripts/import-realmworks.js) extends CONFIG.TinyMCE.style_formats with its own formatting styles.

These styles do not appear when Custom Journals is enabled. This is because options.style_formats is being initialised explicitly to only the Secret style, rather than CONFIG.TinyMCE.style_formats.

If Custom Journal were to initialise options.style_formats from CONFIG.TinyMCE.style_formats then this would allow styles from other modules to be blended with your own styles.

Fair-Strides commented 1 year ago

I've re-worked the v10 version to do this, though with ProseMirror being a pain to work with, I haven't hooked into that yet. Not sure how I'd go about doing that...

farling42 commented 1 year ago

I haven't hooked into ProseMirror either - but fortunately we can still choose TinyMCE editor for journals, and my favoured game system "Cypher System" allows us to choose the editor to be used for the relevant parts of Actors and Items too.

farling42 commented 1 year ago

I had thought about writing a library module for ProseMirror which would allow the simple configuration that TinyMCE allows, but I know nothing about ProseMirror at the moment.