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

Use ProseMirror Editor instead of TinyMCE. #32

Open
jonathanmclaus opened this issue Apr 19, 2023 · 5 comments
Open

Use ProseMirror Editor instead of TinyMCE. #32

jonathanmclaus opened this issue Apr 19, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@jonathanmclaus
Copy link

The text editor used for descriptions, GM notes, etc currently uses the legacy TinyMCE editor, rather than the newer ProseMirror, which is now used for core Foundry features, such as journal editing.

One key feature of the new editor that makes migration worthwhile is autosave functionality.

@jonathanmclaus jonathanmclaus added the enhancement New feature or request label Apr 19, 2023
@typhonrt
Copy link
Collaborator

typhonrt commented Apr 19, 2023

Hi @jonathanmclaus. Thanks for writing an issue! :D

This probably is not going to happen for as long as TinyMCE is available. I trick out the editor with additional options including a custom plugin to import videos from YouTube / Vimeo. Along with many more editing capabilities that simply are not possible w/ the PM editor. For FQL users that take advantage of all of that they will no longer be able to open / edit that content. There is a lot more frustration and bad UX in switching to the PM editor.

I also simply think that the PM based effort is not up to snuff yet and I don't think this is going to change any time soon. There are many missing features and edge cases / lack of good UX with the PM based editor.

FQL automatically saves editor content when quest preview apps / windows are closed. Is there a specific instance where you feel like the editing content is not being saved correctly?

You'll also have to give a quick overview of the PM autosave functionality. I'm not aware of any time based autosaving capability of the PM editor. Are you talking about the editor saving content every 15 seconds or a time based duration?

@typhonrt typhonrt added discussion and removed enhancement New feature or request labels Apr 19, 2023
@jonathanmclaus
Copy link
Author

jonathanmclaus commented Apr 19, 2023

The PM editor autosaves every 60 seconds, which is controlled by a core Foundry setting.

image

I was unaware that FQL automatically saves editor. That's definitely helpful. The lack of an automatic autosave has only been a problem for because I use the Forge, which automatically closes connections after an hour. Occasionally I'll have to step away from the computer, not closing the FQL editor, and then my client has been closed by the time I get back. Sounds like I should just be a more careful with that then - the automatic save on close should be more than enough.

@typhonrt
Copy link
Collaborator

typhonrt commented Apr 19, 2023

I see... Good to know. I wasn't aware of this core feature despite spending quite a bit of time w/ the editors.

FQL autosaves on app close and other actions where it's necessary. It doesn't have an autosave every X seconds feature.

This is a bit of a separate discussion:
For v11 I'm actually releasing a new module called "TinyMCE Everywhere!" that gives you full control over being able to use the MCE editor everywhere on the platform including game systems that explicitly use the PM editor. It has a lot of configuration features including theming of the editor and fully tricks out MCE with a lot of capabilities that aren't normally exposed. I'll add the capability to have the TinyMCE editors autosave in that manner. So, thanks to bringing this to my attention! :D


Quite possibly I'll look into also make FQL use the same autosave capability w/ the TinyMCE editor. I'll certainly put this on the list of things to look at for the v11 FQL update that will be out when v11 drops officially.

@typhonrt typhonrt added enhancement New feature or request and removed discussion labels Apr 19, 2023
@jonathanmclaus
Copy link
Author

Would it be possible to just allow for an option controlling whether FQL uses ProseMirror or TinyMCE? I think it would be an uphill battle to ensure they support the exact same features users care about, so having an option would be nice. Or supporting an inverse setting in TinyMCE Everywhere where every editor becomes ProseMirror.

@typhonrt
Copy link
Collaborator

typhonrt commented Apr 21, 2023

I have a strong opinion that the ProseMirror based editor won't be ready for "prime time" or what I consider a good user experience for quite some time if ever.

Some background info that is good to understand is that ProseMirror (PM) isn't a full blown rich text editor like TinyMCE or other options out there like Quill and such. PM is a low level library that provides the heartbeat for developers to make their own customized rich text editor (RTE). The core Foundry team is essentially making their own customized RTE that is neither user or developer friendly or all that capable at this point. IE IMHO it was a poor / improperly scoped engineering decision to think that writing a customized RTE was a good solution for Foundry. The editor / RTE is not a central feature of Foundry and the PM based effort won't receive the time and attention necessary to make it good. This choice was made to add "collaborative editing". The collaborative editing capability fails to work for any sort of extension a developer might do to the PM editor as it is not possible to update the server side schema, so even this feature is of very limited use.

The Foundry core team could have switched to Quill as it supports collaborative editing without having to write a custom RTE. In other words the PM based editor direction is a "boondoggle". Collaborative editing is a great blue sky idea for adding, but that led to not great engineering decisions / scoping on how to get there. It's possible for the Foundry core team to be great at a lot of things, but this isn't one of those things.

If and when the PM based effort is worthy I'll certainly provide an option to use it, but until then TinyMCE is a significantly better user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants