Update TinyMCE from v4 to v5

i mean a beta version, or something like that… :smile:

anyway, i’ll think about creating an account in GitHub so that i can jump in…

4 Likes

Nice job.

2 Likes

Wow, that’s pretty cool @anon71687268 - Congratulations for being amazing.

Such a good organization is really motivating. I will convince some friends who use WP for their blogs to make the change to CP.

Also, I will test your plugin and see if I can collaborate with this, got some free time the following days.

As you mentioned, if I find something useful I will open a GitHub issue about it.

:rocket:

4 Likes

You can download the zip file directly from GitHub: https://github.com/ClassicPress-research/ClassicPress-Editor/archive/refs/heads/main.zip

1 Like

had already jumped in earlier today… registered in GitHub and started to test it…

4 Likes

8 posts were split to a new topic: Should CP v2 move to TinyMCE 5?

Aw shucks! :smiley: Thanks.

That’s fantastic! As this will probably be a fairly large amount of work, every bit helps.

2 Likes

What would the purpose of the new discussion be? Just trying to understand what to name it. Are we discussing experimental work on the plugin separate from the petition? Or moving away from WP?

There are several different points in that answer, so I would appreciate it if you could point me in the right direction and I can split it.

@azurecurve already split it. It was the question of: “What appeals to you about this particular project?” asked by @james, as this project seemed to get a lot of attention and interest in a short time. If it can be learned what got people excited about it, perhaps that same logic/idea can be applied to other areas of the project.

1 Like

Oh… this is nice. The plugin now has a working “add code” button. You select the language and it displays on your page like this. Thanks @anon71687268 for getting that sorted. :+1:

3 Likes

I was just at GitHub posting to you that I’d got it sorted… and you were over here posting to me that you liked how I got it sorted. Seems like a win! :smiley:

4 Likes

That’s why I’m here. Got notified, got it tested and gotta tell others.

1 Like

We’ve added templates to the repository to help users include all the needed information when opening issues.

So, when you report issues, you’ll find something like this:

Note: the yellow highlighted parts (sections) should remain in your issue and under each section you can add the relevant details, as shown. If a particular section is not needed for the issue, you can remove that section (and the dummy data under it.) The highlighting is only used here for reference; it’s not in the actual templates.

Thanks for helping to keep the effort organized!

5 Likes

did look, but it is not a priority right now, more important things first. But the general plan is to just ignore plugins, anything important enough can be in core or in a core plugin. You can not ensure backward compatibility forever without it holding you back forever. This is basically why WP do not upgrade tiny, ozz is very capable of doing the upgrade and fix whatever needed from core side, he just don’t feel like doing the effort of coordinating with the plugins community when his boss always say that gutenberg is the only editor WP needs.

Thanks for commenting Mark. You’re right. The general community consensus is to move ClassicPress in its own direction and focus on building our own plugins, which is what will start happening with version 2.0. It will have some breaking changes. But we will continue to support version 1.x as a drop-in replacement for WordPress 4.9 for as long as community needs it.

2 Likes

@joyously - Where are you working on this right now? I went through the Github issues but I am a bit lost on where to start doing anything to help here. I wanted to do something while I wait on feedback about the Plugin Directory API.

The thing is, I installed the plugin but the editor doesn’t load. What is the most direct useful thing that we can do so that the editor can be used for new CP projects?

If you installed the plugin, you know it is at GitHub - ClassicPress-research/ClassicPress-Editor as stated, and it shows the recent commits I have made.
If you have a problem, please open an issue.
I am working my way through the existing issues.

2 Likes

Perfect, I just asked because since you have been working on it, you may already have a mental map of what the next most important step is, to at least make it work for a clean CP installation :slight_smile:

Since it works for me, what is important is to make sure everything works the best it can, meaning the plugins that start with wp should be very solid, but those are the least solid right now.
The toolbar needs to be revisited, since I put a temporary way for it to work and it’s not as reliable as before.

2 Likes

I was previously lamenting the fact that in the 5.x TinyMCE, you can’t specify a class on your toolbar button like you could in 4.x. Since there were several that are added by custom code and are then manipulated in some way (JS or CSS), I didn’t quite know how to proceed. Reading the issues for something else, I came across one where people were asking for the class parameter (as if it had never been there), and the response in 2019 was that they removed it intentionally so the UI is more consistent. It sounds as if it was a problem with their cloud version since they have to support whatever people do, so they limit what they can do.

One person commented with some code to add your class when you create the button, by doing a find on a temp class you put in the text parameter and then call closest to get the button and add the class, and remove the temp text node. It’s pretty hacky, but something I was considering before this. Then I noticed that the function they used tinymce.dom.DomQuery was deprecated in 5.10, to be removed in 6.0. It can still be done with vanilla JS, but really I wonder if 5.x is better in any way than 4.x.

About the same time I was reading the issues, someone commented on the WP ticket for the 5.x update, saying that 5.10 fixed a security issue present in all prior versions. But it’s only present while editing, so it likely doesn’t really affect the admin page. Also, it affects the link and image plugins. We don’t use link (there is wplink) and the image plugin is loaded, but there are custom interfaces being used. So I think it isn’t super important.
This wouldn’t apply to plugins that bundle TinyMCE (there are a lot!) or use the editor on the front end.

2 Likes