Forums  ›  General  ›  General discussions
 

TinyMCE

Will it be possible to include this new TinyMCE; along with the file manager, in existing Cheetah sites by using the Github repo?

Also, are there any checks on file uploads to prevent someone from trying to run php or javascript code or would that be left up to the site's developer?

Look very nice, thanks bro

Thanks Deano, we really appreciate all the hard work you are doing to improve the platform.

Need to be more clear on that. It has a built in upload feature, but you have to provide the script that accepts the uploads. So it's up to that script which can do anything you want it to do.

I have written one for Cheetah. It's being tested here. The image icon in the editor will have a upload link.

The script i wrote does the same thing. It overwrites the same file. I also have each members uploads going into their own folder.

Testing image upload.

 

Turns out tinymce has had image upload features in it for quite some time.

An option in the tinymce init. images_upload_url: 'postAcceptor.php',

That adds a upload section to the image plugin. Then just needs a script to handle the uploads and a directory to put them in. Easy Peasy.

I am enabling it by default when i upgrade to tinymce 5 so everything in the next version of cheetah for tinymce image uploads will be in place.

 

That sounds interesting.  Will it set it so each member have their own upload directory?  Also, what happens when a member uploads a file with the same name?  I set jbimages to overwrite when the same file name is uploaded.  The reason was to keep members from uploading hundreds of the same file.  For example, they like to add a particular smiley graphic; say big-grin.gif.  Every time they the post they upload this big-grin.gif to insert in their post.  If it doesn't overwrite the existing big-grin.gif, then we end up with hundreds of the same graphic image on the server.

TinyMCE Version: 5.7.0 (2021-02-10) is now running on this site.

I am still tweeking the skin for this site. Skins are a little different so i could not use the skin i made for the 4.x line of tinymce. So i am working on another one.

If things look really weird or not working, you may need to clear your browsers cache to load the new CSS and JS files.

Turns out tinymce has had image upload features in it for quite some time.

An option in the tinymce init. images_upload_url: 'postAcceptor.php',

That adds a upload section to the image plugin. Then just needs a script to handle the uploads and a directory to put them in. Easy Peasy.

I am enabling it by default when i upgrade to tinymce 5 so everything in the next version of cheetah for tinymce image uploads will be in place.

 

I should have the cheetah repo for tinymce updated in a couple of days.

When it is ready I will test it.  WIll be interesting to see what plugins will break.  I am not sure that jbimages upload is a security issue; I created a simple php file, named it bad-code.jpg and jbimages would not allow me to upload it.  However, it is my understanding that third party plugins may not work for TinyMCE 5.7  Looking around the net for an open source quick and easy upload plugin for TinyMCE does not turn up much.  Jbimages is not a file manager; it just allows you to quickly insert an image at the cursor with three clicks, click 1 on upload button, click 2 on browse button, click 3 is submit chosen image; well actually four clicks since you need to select the image from your local directory..

 

 

I have a issue already in the Cheetah repository to upgrade tinymce. So i do have plans to upgrade at some point.

I was curious to see what would happen.  I don't have time to see what will need to be changed for the 5.x line.  I did read where 5.7.0 does have an image upload but couldn't find a working demo on TinyMCE website.  On image upload, I like to separate out the member's uploads.  Makes it easier to do admin stuff when you can just go to the member's directory.  Only don't do it like Boonex did with Moxie Manager; I have no idea what Anton was thinking with the directory structure they set up for Moxie Manager; very cumbersome.

I think that upload feature is part of their cloud offering. The downloadable self hosted version does not appear to have it. Or at least i could not locate it.

Anyhow, i am in the process of upgrading to version 5.7 of tinymce.  There are some differences in how skins are done which is whats breaking things in cheetah. There also are not as many languages for the 5.x line as there are for the 4.x line. But most of the 4.x language files will work in the 5.x line.

I should have the cheetah repo for tinymce updated in a couple of days.

 

 

I did read where 5.7.0 does have an image upload

 I think this is a feature offered to paying supporters. It certainly was in older versions.

I have added jpimages to a Cheetah 1.1.0 site to allow upload of images; it is nice because it is just a few clicks to insert an image at the cursor.  Now, they say that jbimages will allow one to upload malicious code to a site.  I am not sure exactly how it will allow it.  I created a php script and named it bad-code.jpg.  When I tried to upload the file, jbimages told me it was not allowed.  Therefore, I am guessing jbimages does check the header of the files.  Jbimages isn't in development and it is old code.  I integrated jbimages to create a directory for each member from their NickName for easy administration.  Gave me the opportunity to look at PDO for mysql since I didn't want to include a lot of Dolphin files just to get the nickname of the logged user.

 

I did read where 5.7.0 does have an image upload

 I think this is a feature offered to paying supporters. It certainly was in older versions.

 

I have a issue already in the Cheetah repository to upgrade tinymce. So i do have plans to upgrade at some point.

I was curious to see what would happen.  I don't have time to see what will need to be changed for the 5.x line.  I did read where 5.7.0 does have an image upload but couldn't find a working demo on TinyMCE website.  On image upload, I like to separate out the member's uploads.  Makes it easier to do admin stuff when you can just go to the member's directory.  Only don't do it like Boonex did with Moxie Manager; I have no idea what Anton was thinking with the directory structure they set up for Moxie Manager; very cumbersome.

I have a issue already in the Cheetah repository to upgrade tinymce. So i do have plans to upgrade at some point.

Cheetah comes with TinyMCE version 4.3.3 (2016-01-14).  I tried TinyMCE version 5.7.0 as a drop-in replacement and it failed to initialise the toolbars.  I am not sure the changes in the 5.x line.  I decided to try the last 4.x line and I was able to drop in TinyMCE version 4.9.11 (2020-07-13); the last version in the 4.x line with just one error:

Failed to load plugin url: https://my-domain.tld/plugins/tinymce/langs/en_GB.js

Drop-in replacement means that you just add the tinymce directory from the download (you really have to hunt for them on the tinymce website) in place of the existing one.