Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-03-25 21:49:20

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

Does anyone have good experience with CKEditor to share?

I have a client who requires WYSIWYG editing. Prior to Textpattern 4.6, we used hak_tinymce, but that stopped playing nice after the Textpattern upgrade.

I tried out the latest versions of both TinyMCE and CKEditor to see if I could get them working with minimal configuration, and CKEditor wasn’t hard to install for Textpattern’s body field. All I had to do was make sure my body field was set to “Leave text untouched”, append a script to the Write panel pointing to ckeditor.js (v4.6.2 coincidentally), and call the CKEDITOR replace function like so:

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

Or so I thought.

This works fine when I create a new article. But when I edit the body text on an existing article, Textpattern doesn’t save my changes—unless I also change another field. The work-around I found is to make changes to the body field using CKEditor, change the article’s Status to Hidden, and click Save. Then change the status back to what it was (usually Live or Sticky), and click Save again.

Does anyone know a better way?

Thanks!

Offline

#2 2017-03-25 22:22:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Does anyone have good experience with CKEditor to share?

Maybe: CKEditor for Textpattern? Petri/kuopassa has implemented several other editors too…


TXP Builders – finely-crafted code, design and txp

Offline

#3 2017-03-26 20:20:46

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

Re: Does anyone have good experience with CKEditor to share?

Thank you, Jakob!

I installed kuo_ckeditor_cdn according to the instructions, and the editor worked. But I did have the exact same problem with that version of CKEditor that I explained above: Creating new articles works, but when I edit the body text of an existing article, Textpattern won’t save the changes.

The same workaround works with kuo_ckeditor_cdn too: When I edit any other field—like the Status field, for example—the changes will save.

Textpattern’s AJAX save dialog appears no matter what, so Textpattern thinks that it saves even if it doesn’t save changes to the body text.

Offline

#4 2017-03-27 00:11:43

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,071
Website Mastodon

Re: Does anyone have good experience with CKEditor to share?

i just tested it as well. no luck . it reports it saved the changes, but when i look at the entry again nothing has changed.

I tried on an existing article.


…. texted postive

Offline

#5 2017-03-27 00:54:42

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

Re: Does anyone have good experience with CKEditor to share?

Thank you for confirming it, Bici!

Is this a conflict with the way Textpattern’s Write panel handles saving asynchronously?

Offline

#6 2017-03-27 01:40:22

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: Does anyone have good experience with CKEditor to share?

johnstephens wrote #305053:

Is this a conflict with the way Textpattern’s Write panel handles saving asynchronously?

I don’t use this or that editor, so can’t comment on that. But did you have a look at your browser console to see if anything (errors, warnings, etc) is logged there?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#7 2017-03-27 03:32:40

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

Re: Does anyone have good experience with CKEditor to share?

Good idea, phiw13. Thanks. I’ll look at that tomorrow.

Offline

#8 2017-03-27 18:12:53

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

Re: Does anyone have good experience with CKEditor to share?

I just tested this while monitoring both Firefox and Chrome consoles. Neither display any errors, warnings, or other info when I edit the body text with CKEditor and click “Save”—even though the changes are not saved.

Offline

#9 2017-03-28 15:49:40

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Does anyone have good experience with CKEditor to share?

I’ve been using Ace for Textpattern on 4.6.2 for several months without an issue. I just tried installing it on CMS Styles (which is running a 4.7 dev build) and I am experiencing the non-saving issue there as well.

So it seems like this is something very new. And affects all of Kuo’s editors.

Offline

#10 2017-07-03 14:51:04

mmelon
Member
Registered: 2006-03-02
Posts: 95

Re: Does anyone have good experience with CKEditor to share?

i am interested to see how this develops

Offline

Board footer

Powered by FluxBB