Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-03-16 15:37:44

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

[REQUEST] New hak_tinymce compatible with TinyMCE 4

Are any TXP developers interested in inheriting hak_tinymce and upgrading it to work with TinyMCE 4? Are other TXP users interested in supporting this plugin and a new developer? Just wanted to put it out here to spread the word and gauge interest/support…

hakjoon wrote #279395:

I just realized I am no longer getting emails when new posts show up on this thread. I don’t know if it is the forum or my account is swallowing them up somehow.

However as everyone can see I’m not around much anymore. I’m not really doing much PHP these days, and I’ve only been superficially keeping up with TXP.

This plugin could really benefit from a new maintainer who has more time for it. I would love to help transition someone over if anyone is interested.

As much as I love keeping this under my wing because it keeps me attached to this community that I really enjoy at this point I’m doing the community a disservice by not having someone else take it on.

p.

Offline

#2 2014-03-16 19:46:59

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

very interested. I’m guessing it would not be too hard to adapt the previous version of hak_tinymce

Offline

#3 2014-07-23 20:31:28

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

bump

I’m still in need of this. Any developers want to ransom it? TinyMCE or CKEditor. Also curious if an Aviary plugin could be created for image editing?

Offline

#4 2014-07-25 02:54:36

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 228
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

I smushed together something that might be useful. :-) It’s TinyMCE 4.1 via CDN for body and excerpt. Could be suitable for new websites which haven’t yet got much content formatted with Textile or other methods.

http://kuopassa.net/file_download/7/kuo_tinymce_cdn_v0.1_zip.txt

Update: Here’s in a similar way constructed CKEditor plugin:

http://kuopassa.net/file_download/8/kuo_ckeditor_cdn_v0.1_zip.txt

Last edited by kuopassa (2014-07-25 12:08:16)

Offline

#5 2014-07-26 00:04:21

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 228
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

photonomad wrote #282396:

bump

I’m still in need of this. Any developers want to ransom it? TinyMCE or CKEditor. Also curious if an Aviary plugin could be created for image editing?

I might have something Aviary related soon. :-) Image editing and saving are ready for it.

Updated: Here’s the Aviary plugin:

http://kuopassa.net/file_download/10/kuo_aviary_cdn_v0.1.zip

Unzip it. Then copy and paste the plugin code to Textpattern. Activate it. Then upload kuo_aviary_saver.php to textpattern folder. Then upload jquery.cookie.js to js folder. And now it’s good to go.

Last edited by kuopassa (2014-07-26 14:02:58)

Offline

#6 2014-08-05 15:57:06

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

kuopassa: Thank you sooo much! Sorry for the delayed response. Both your TinyMCE and Aviary plugins are a huge help! I only had time in the last couple of days to install and really test them out.

—————————————————————-
TinyMCE and CKEditor
—————————————————————-
I did run into an issue when trying out kuo_tinymce_cdn_v0.1 and kuo_ckeditor_cdn_v0.1 (separately). Both plugins load the editor and articles publish initially without any issues. However, subsequent attempts to save changes to the article body or excerpt would only save if the Save button was clicked twice.

I borrowed a fix from the hak_tinymce forum thread for kuo_tinymce_cdn.
Add the following to the end of your plugin code before the last });.

if ($("form.async")) {
   $("form.async").on("click", "input[type=submit]", function (evt) {
        tinyMCE.triggerSave();
   });
}

—————————————————————-
Aviary Plugin
—————————————————————-
The plugin works great. There are jsut a couple of odd styling/appearance issues that I can’t remedy. On my site, when an image first loads in the Aviary window it jumps down so that only the very top of the picture is viewable. The only way to get it to fit in view is to resize the browser window slightly. Also, the font for pixel dimensions when resizing an image is too large for its input field. Just curious if you’ve experienced these same styling issues?
Here’s a quick screencast of how it behaves:
https://www.dropbox.com/s/u1dk3i9whjq9qbb/AviaryAppearance.mp4

Last edited by photonomad (2014-08-05 21:34:50)

Offline

#7 2014-08-05 22:23:19

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 228
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

Thanks, photonomad for constructing so much valuable feedback. It’s really appreciated. :-)

I can replicate that saving problem with both plugins and with Classic, Hive and Remora admin themes. Your fix seems to work perfectly for kuo_tinymce_cdn.

Aviary plugin seems to cause image in the edit area to jump out of its place with Hive theme. Works well with Classic and Remora.

I’ll try to fix things a bit later when I’ve got more time. In the meantime please log in to Textpattern with admin account and yell something like “I command you!” because sometimes code forgets who’s the boss.

Updated 8 August: The plugin for TinyMCE was updated with photonomad’s great code snippet. I found a fix to CKEditor plugin. It requires a special JavaScript file. It’s included in the plugin’s zip file.

Last edited by kuopassa (2014-08-08 08:45:08)

Offline

#8 2014-12-12 21:14:06

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

koupassa: For some reason I am now not able to save my edited images from Aviary. I am able to edit the images, but when I click save, a browser alert window opens and says “Unable to save.”

Video of the problem: http://youtu.be/XfBOrWnkXes

I’m wondering if this has anything to do with upgrading to 4.5.7? I can’t recall if I tested your Aviary plugin it since upgrading.

Offline

#9 2014-12-13 01:30:38

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 228
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

Thanks for the video, photonomad. :-) I was able to replicate that issue. Aviary changed their API settings a bit so nowadays it seems they save edited images temporarily to Amazon’s CDN, which caused this plugin not to work. Aviary also (I think) changed default value for maximum image width. From now on images edited with Aviary for Textpattern can be max. 2600 pixels wide. If original image is like 3000 pixels, it’s shrinked to 2600. If original image is 800 px, it’s still going to be 800 after saving.

Plugin is basically fixed now. But I need to double check things. After that you’ll get the download link.

Offline

#10 2014-12-13 03:48:45

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

Wow. That was a fast diagnosis! Thanks so much for figuring it out! I was wondering if it might be something to do with the API, since Adobe recently acquired Aviary. You rock! :)

Offline

#11 2014-12-15 19:19:57

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

For users of kuo_tinymce_cdn:

I modified bot_image_upload to work with Tinymce 4’s file browser. I don’t consider myself a real plugin author. Just sharing this here in case those with more knowledge have ideas on making more robust.

In order to get it to work, you have to do a few things:

Install the plugin (I haven’t registered this as an official plugin, but I did name it with my initials so that it wouldn’t be interfere with installs of bot_image_upload plugin):
http://photonomad.com/txpplugins/spi_imgtmce_upload_v0.1.txt
Currently it is set to use #custom-1 (your first custom field) to temporarily hold the id of the image you select. Change it if you want to use a different custom field. I have also hidden the custom field from view in the write tab using bot_wtc

Copy this js code and reference it in your write tab:
http://photonomad.com/txpplugins/rah_eo_txp.js
I put this code in a form with rah_external_output and then use bot_wtc to insert the <script url> into the head of the write tab. Note that this code also references the custom field you are using. So be sure to edit it if you aren’t using #custom-1.

Finally, add this to the tinymce settings in kuo_tinymce_cdn:

file_browser_callback: function(image) { 
        get_spi_imgtmce();
},

For those who try it: let know if you have trouble or if you have suggestions on how to make it work better (and less complicated to install).

Moderator’s annotation:
Edited Textile markup for better readability.
– Uli –

Last edited by uli (2015-10-15 19:05:08)

Offline

#12 2014-12-15 21:38:18

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [REQUEST] New hak_tinymce compatible with TinyMCE 4

So I reserved spi for you, Stacey. Shout if you want to have plugin author status in this forum, just needs an admin, not a me.

BTW Thanks for sharing your work!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB