Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1191 2017-03-13 16:42:10

Hennie
Member
From: Nederland
Registered: 2009-02-06
Posts: 18
Website

Re: hak_tinymce WYSIWYG article editor

Is hak_tinymce dead?

Offline

#1192 2017-03-14 20:42:23

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

Re: hak_tinymce WYSIWYG article editor

Hennie wrote #304693:

Is hak_tinymce dead?

hakjoon wrote #279395:

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.

2 years ago. But never say never.


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

Offline

#1193 2017-05-21 00:48:33

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

Re: hak_tinymce WYSIWYG article editor

hak_tinymce does not appear to be compatible with TextPattern 4.6.x. I don’t see the “toggle editor” option when creating or editing an article.

Has anyone figured out a work-around ?

Offline

#1194 2017-05-21 03:43:14

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 981
Website

Re: hak_tinymce WYSIWYG article editor

Yes, I upgraded a site a couple months ago that relied on hak_tinymce. I simply found the latest version of CKEditor and cobbled together a simple plugin that injects the appropriate JavaScript into Textpattern’s write tab.

First, I downloaded CKEditor here, and placed the files in a directory called “plugins” in my document root.

Then I made a plugin with the following function:

register_callback('pax_write_append', 'article');

function pax_write_append() {

  $out = '<script src="/plugins/ckeditor/ckeditor.js"></script>';
  $out .= '<script>';
  $out .= 'CKEDITOR.replace("body"); \n';

  /**
   * Uncomment this line to add CKEditor to the Excerpt field
   */
  // $out .= 'CKEDITOR.replace("excerpt"); \n';
  $out .= '</script>';

  echo $out;

}

It has worked perfectly with Textpattern 4.6.*, but it does behave differently than TinyMCE. TinyMCE allowed the client to add PayPal buttons (which include HTML form elements) in the body of an article, but CKEditor strips form markup out. To fix that, I created a different workaround, which is beyond the scope of this post.

I tried installing the latest version of TinyMCE in a similar fashion before switching to CKEditor, but it didn’t work and I can’t remember why. Someone pointed me to Kuopassa’s CKEditor plugin here too, but when I tried it out, I think I found my solution simpler.

Good luck!

Offline

Board footer

Powered by FluxBB