Update TinyMCE from v4 to v5

As a side note, winnipress is in pieces right now and not functional. It’s all broken.

Hi @joyously - I actually stopped that. I was going a lonely route that isn’t practical. Now working as a freelancer on Toptal and there is one clear thing: reinventing the wheel is a waste of time, money and energy.

Cleaning up WP the way I intended to do actually means to build a new CMS that only has a few similarities with WP. But taking a look around, there already are modern existing solutions, like Strapi, or even ExpressionEngine is already quite a clean CMS. Many… many existing solutions with big communities behind. Not worth the effort.

ClassicPress makes sense, and as others say, it would be great if TinyMce was updated to the latest version. It would be (in my opinion) a real difference with WP 4.9. So far to me CP just seems like a “frozen” WP 4.9. Not hating on it, and well aware of the fact that work is being done to remove bloat, keep security measures up to date, and so on… but in the end, it’s just a rebranded WP 4.9 that won’t be able to really stand out if it sticks to 100% back-compat.

100% back compat = 0% innovation.

0% innovation = why would someone use CP instead of WP? (other than to have a different branding and the classic editor, which can be done using the Classic Editor plugin…) [Yes… some say it won’t be supported forever but, in the end, it will. If WP doesn’t want to lose half its community, which of course Automattic wants not]

Edit: by the way, I am open to help with the TinyMce v4 --> v5 transition.

6 Likes

Hey, good to see you around.
What a lot of people don’t get is that CP v1 is for staying compatible with WP 4.9. CP v2 would break compatibility, and improve things. We just need the people to make it happen.
What do we need to do to update TinyMCE? I think we need to consult the TinyMCE docs and the WP ticket listed above and then try it. JS is not my strong suit, so I can only give general advice.

1 Like

I’m in :slight_smile:

The most difficult task is to identify all the parts in core that would have to be modified. Modifications are not that hard to come up with, but managing to find the right places inside the WP puzzle is a difficult task.

I am in to help with this, how are you in CP currently doing things to stay organized and productive?

3 Likes

Have a look at our contributing guidelines on GitHub, for starters: ClassicPress/CONTRIBUTING.md at 1aba7ad744c25114a200f5aa62915bd0794befdd · ClassicPress/ClassicPress · GitHub

The TinyMCE upgrade is a bit different, because it has been done in WordPress, but the WP and CP codebases have diverged enough so that our typical backport process (explained in that document) probably will not work.

Since this change is likely to be fairly complicated, I would recommend creating a plugin that makes the TinyMCE upgrade available so that people can test it first. If there are hooks/filters that need to be added to ClassicPress in order to make it easier for a plugin to do this, then those changes are very much welcome.

No, it has not been done in WP, and it’s not likely to be.

A two year old comment in a WP ticket gives a little insight, but it’s for version 4. #31596 (Make it easier to update TinyMCE) – WordPress Trac

Again, the ticket for updating TinyMCE is still open, the details are in this comment: #47218 (Update TinyMCE to 5.X.X) – WordPress Trac

Thanks, I did not realize this. I assumed that the upgrade was being considered here because WP had already done it.

So I think we need to take a step back here, and look at catching up with WP first, by upgrading TinyMCE to the latest 4.x version. This is also likely to be a fairly complicated change, and it will be good practice for future TinyMCE upgrades.

There also needs to be a pretty clear benefit to this upgrade for ClassicPress users. “It contains security fixes” isn’t enough: this statement has been made a couple times, but unfortunately it has been made without an understanding of what the security fixes actually are and how they would actually benefit ClassicPress users.

I started the petition because it would be a great differentiator between the platforms (and possibly a way to bring WP people over.) For me, the biggest benefit isn’t necessarily the security fixes; the benefit is in not using no-longer-supported software and shedding a sliver of technical debt in the process.

4 Likes

On the other hand (and as previously mentioned on this thread), using TinyMCE v5 would probably break compatibility with a lot of existing plugins.

I agree with your point about technical debt. I also think it’s important to come up with a list of specific features or improvements that upgrading to TinyMCE v5 would give us.

4 Likes

Seems like this could more easily be done in CP v2 than v1.

3 Likes

One thing an update will give us is current documentation. The docs for v4.x are atrocious. :slight_smile:

5 Likes

So, guess who integrated TinyMCE v5 with ClassicPress for lunch. Granted, this is more features than a typical ClassicPress editor would need, but, isn’t it lovely?!

:smiley:

6 Likes

Curious, what if anything broke? Because honestly I’m onboard to pull this into core.

2 Likes

I didn’t find anything broken… even my console is clean! I’m feeling mildly giddy right now!!!

4 Likes

Excellent work! Have you tried any plugins that integrate with TinyMCE? For example, Enriched Editor. Integrations might be the source of our problems. I would like to be wrong, though :slight_smile:

1 Like

I’d say this is just a basic core integration… the options are pretty much hardcoded as a PoC. I wouldn’t say that it was “put it to the test” … I would say that it is “merely working”. I didn’t take into account anything other than “what will it take to make v5 work in the editor” and that’s what I did. I disabled v4 (via filter) and enqueued the new assets and initialized it. And voila. It Just Worked™. So, most likely, there will be issues. :smiley:

3 Likes

I think this is a great candidate for a research plugin that we can play with and test before pulling into core :+1:

4 Likes

For sure. …and it’s all pluginified and ready to be uploaded somewhere for further smashing. :smiley:

5 Likes

Happy to get a research repo up, just let me know when anyone is ready to push some code there :+1:

4 Likes