tinymce4 for Version 1.6

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: tinymce4 for Version 1.6

Post by manu » Mon Aug 17, 2015 10:09 am

cmb wrote:Pretty cool! Do you plan to use the "new Upload API" mentionend in the blog post? Might be rather reasonable for large images.
Hi Christoph
I watch the scenery for this moment.
As the imageUpload is executed asynchronously I would have somehow to delay the save command (until upload is done) or inhibit the save command while uploading is active. At the moment I have no idea for an easy solution, but I'm probably not alone.
EDIT: the

Code: Select all

 save_onsavecallback: function()
could do the job. I keep watching.

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: tinymce4 for Version 1.6

Post by manu » Thu Aug 20, 2015 10:01 am

There is a new version available according to Chris' recommendations.
Added to config's imagetools init:
  • imageUpload: ImageUpload is executed after save button pressed, say the modified images are uploaded onto the image directory. Be aware that the content save ist effectuated only on successfull ImageUpload. On failure of ImageUpload look into the log file. There must be an according error msg.
  • paste_data_images: Now you can drag/drop images into the edit area, modifiy them and let them being uploaded (tested on FF and IE)!
Please be aware this is a pretty early stable version. Use it with caution and post any errors unexpected results.
regards manu

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: tinymce4 for Version 1.6

Post by cmb » Thu Aug 20, 2015 12:27 pm

manu wrote:ImageUpload is executed after save button pressed, say the modified images are uploaded onto the image directory.
Very nice! Some suggestions:

What I would like is better feedback for the user. When the internet connection is slow, after pressing the save button there doesn't seem to happen anything if modified images have to be uploaded. At least some indication that there's something happening would be good; if only making the <body> partially transparent.

If the image upload fails, it would be nice if the user could see the error message right away (instead of having to look into the log file). Otherwise they might think that everything worked fine, switch to view mode, and all the modifications are gone without further notice. At least marking the editor as not dirty should better not be done, if the upload failed.

What I also would like is that the images are (optionally?) stored as JPEG to save bandwidth later. Ideally the images would be transferred in the final storage format, but I understand that this would require to implement JPEG compression in the browser. It might still be useful to recompress the images after upload.
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: tinymce4 for Version 1.6

Post by manu » Thu Aug 20, 2015 1:23 pm

cmb wrote:What I would like is better feedback for the user. When the internet connection is slow, after pressing the save button there doesn't seem to happen anything if modified images have to be uploaded. At least some indication that there's something happening would be good; if only making the <body> partially transparent.

If the image upload fails, it would be nice if the user could see the error message right away (instead of having to look into the log file). Otherwise they might think that everything worked fine, switch to view mode, and all the modifications are gone without further notice. At least marking the editor as not dirty should better not be done, if the upload failed.
The problem is, first I have to run imageUpload and wait until its done. Unfortunately I only get a callback on success (at the moment, I'm waiting for improvements), not on fail. That why I hesitate to gray out things...
What I also would like is that the images are (optionally?) stored as JPEG to save bandwidth later. Ideally the images would be transferred in the final storage format, but I understand that this would require to implement JPEG compression in the browser. It might still be useful to recompress the images after upload.
Compression before upload would be perfect. At the moment all is new. I just wait and see what happens on the developers side @moxiecode.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: tinymce4 for Version 1.6

Post by cmb » Thu Aug 20, 2015 2:59 pm

manu wrote:The problem is, first I have to run imageUpload and wait until its done. Unfortunately I only get a callback on success (at the moment, I'm waiting for improvements), not on fail. That why I hesitate to gray out things...
As I understand it, it would be possible to use a custom images_upload_handler. This might also be used to check whether trying to upload makes sense (by comparing the image size with CMSimple_XH's Images → Maxsize setting).
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: tinymce4 for Version 1.6

Post by manu » Fri Aug 21, 2015 7:35 am

But still, tinymce has to wait until the upload handler has processed all images and triggers the callback.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: tinymce4 for Version 1.6

Post by cmb » Fri Aug 21, 2015 10:57 pm

manu wrote:But still, tinymce has to wait until the upload handler has processed all images and triggers the callback.
ACK. However, the image upload might be done synchronously; surely not the best option, but not too bad either, because the required session would prohibit parallel processing anyway (the default session handler locks the session files exclusively). And most certainly it would be possible to use asynchronous XHR and syncing that otherwise.
Christoph M. Becker – Plugins for CMSimple_XH

utaka
Posts: 52
Joined: Fri Sep 18, 2015 6:00 am
Location: japanese
Contact:

Re: tinymce4 for Version 1.6

Post by utaka » Mon Oct 12, 2015 6:28 pm

Hi,thanks tinyMCE4CMSimple_XH.
I tested tinyMCE4CMSimple_XH( tinymce4.1.2.5) and TinyMCE's plugin.

1:inti.php is limited to 'tinymce/langs/my_lang.js' ,other than en
It is not loaded language file for TinyMCE's plugin
Please change
init.php About About Line216

Code: Select all

    $temp = str_replace(
        '%LANGUAGE%', $tiny_language !='en' ? 
//        'language_url: "' . 
//        CMSIMPLE_ROOT.'plugins/tinymce4/tinymce/langs/' . 
//        $tiny_language.'.js",' : 
        'language: "' . $tiny_language .'",' : 
        'language: "en",', $temp
    );

2:compat3x is broken. Installation mistake
http://www.tinymce.com/wiki.php/Plugin:compat3x

Code: Select all

tinymce /
        |- langs/ 
        |- themes/
        |- plugins/  
        |- utils/   <-- From compat3x
        |- langstiny_mce_popup.js <-- From compat3x

tinymce/
  plugins/compat3x
                  |- css/
                  |- img/
                  |- plugin.js
                  |- plugin.min.js
By this 2fix ,worked Adds clear buttons to TinyMCE Editor For CMSimple
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: tinymce4 for Version 1.6

Post by manu » Tue Oct 13, 2015 8:51 am

Hi utaka

re #1: see init.js files for explanation. CDN Version languages other than 'en' need a locally installed language file.
To comply your demand try this ~ line 216:

Code: Select all

    $temp = str_replace(
        '%LANGUAGE%', $tiny_language !='en' ? 
            TINYMCE4_VARIANT == 'CDN' ?
                'language_url: "' . 
                CMSIMPLE_ROOT.'plugins/tinymce4/tinymce/langs/' . 
                $tiny_language.'.js",'
            :   'language: "' . $tiny_language .'",' 
        :   'language: "en",', $temp
    );
re #2: compat3x plugin directory is a reminder of an earlier installation. It is not activated by default. I would suggest to remove it and leave the plugin installation personnaly optional.
regards
manu

utaka
Posts: 52
Joined: Fri Sep 18, 2015 6:00 am
Location: japanese
Contact:

failed to open stream: Operation timed out .../index.php:84

Post by utaka » Sun Dec 06, 2015 5:42 pm

Hi,The display of the home page there are times when it takes over 2 to 3 minutes.
Very Very Slow :shock:
I Get ,
WARNING: file(http://tinymce.cachefly.net/index.txt) [function.file]: failed to open stream: Operation timed out
/*****/plugins/tinymce4/index.php:84
index.php Line:84

Code: Select all

function tinymce4GetCdnVersions()
{
    return file("http://tinymce.cachefly.net/index.txt");
}
As first aid , I Change to index.php Line:60

Code: Select all

function tinymce4GetCdnVersion()
{
    return " "; 
I think CDN version check and unnecessary.
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----

Post Reply