0

I feel like I have been searching the web dry about this.

When using CKeditor with PHP, you are still only allowed one instance open with same name.

If you have more you get:

The instance "yourname" already exists.

error.

I see a lot of people solving this by closing/destroying the instance with jquery or javascript.

This guy is having the same problem: https://stackoverflow.com/questions/8839576/ckeditor-cannot-call-method-destroy-of-undefined

One solution is to leave the name blank, then you can create as many instance as you like. But this is not a good solution for me, as I need the name to send $_post.

So does anyone know how to destroy/close an instance in CKeditor with PHP?

EDIT: Fixed it in no time switching to javascript: CKEditor instance already exists

Community
  • 1
  • 1
Bolli
  • 4,974
  • 6
  • 31
  • 47
  • 1
    I have always thought ckeditor was a WYSIWYG editor written in HTML and Javascript. Then I don't see how PHP could interact with the Javascript code. Am I wrong? – Jocelyn Aug 06 '12 at 00:48
  • You can implement it with PHP, but you might be right that javascript is the best way to go. – Bolli Aug 06 '12 at 00:53
  • I really can't see the problem here as PHP is just something that generates HTML and possibly JavaScript. Add your solution as an answer, please. – Joel Peltonen Apr 08 '13 at 21:25
  • @Nenotlep I am not sure what you are asking. Are you having the same problem? I never solved the problem implementing it with PHP, so I decided to go with the javascript version. – Bolli Apr 09 '13 at 01:29
  • @Bolli Sorry for being unclear, I just meant that it would be nice to get an answer to this question and get it off of the "unanswered" list because it seemed that a solution had been found. Don't worry about it, I'm just trying to do some cleaning of unanswered questions sometimes. – Joel Peltonen Apr 09 '13 at 07:32
  • @Bolli Also, I was very curious to see how it would be possible to implement it with PHP as PHP is 100% a server side language and CKE is 100% a client side solution - even theoretically I can't see that as possible. The exception would be if generating and processing HTML+JS with PHP would be considered as actual PHP :) – Joel Peltonen Apr 09 '13 at 07:36
  • @Nenotlep Oh I see. Well, its been a while but I guess CKeditor still draws using HTML and Javascript. But you can implement it with PHP, using config.php instead of config.js and calling instances with php, rather than with JS. It's just two different ways you can implement CKeditor into your project. – Bolli Apr 09 '13 at 11:21

0 Answers0