new WYSIWYG-Editor event Plugin: CKEDITOR!

Creating and modifying plugins.
Post Reply
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

@ICE
Could you please test this for me, to work finally in all three mod_rewrite versions with your site?
https://raw.github.com/s9y/additional_p ... editor.php (just grab and replace)

PS. To the others: This is not advised to take on its own, this will be possible for ICE only!
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
ICE
Regular
Posts: 240
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE »

Works! (with disabled, errorhandling and mod_rewrite)
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

Thanks! :)

Sadly I will have to move things around again, since I just discovered, that I have now dropped the hooked-in buttons (linktrimmer, amazonchooser) in nugget textareas (only). :(
I will have to come back on this topic in the next days. We still have some time, since the sync doesn't work yet. So, stay tuned!
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
ICE
Regular
Posts: 240
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE »

:( :( :(
I hope this will come to an end ... :idea:
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

Are you hit by this and I have to hurry up?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
ICE
Regular
Posts: 240
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE »

No, no, all is fine. Plugin works for me now. I know your debugging problems ... one Problem solved, another problem appears ... Take your time.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

I reverted my move of nugget area, while it got too complicated passing execution javascript for the moment.
https://raw.github.com/s9y/additional_p ... editor.php (drag & drop for ICE only!). Thanks.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
ICE
Regular
Posts: 240
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE »

Works! (with disabled, errorhandling and mod_rewrite)
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

OK, the sync was pushed.
(1.7 users remember the purge/install usage after update, if not using 1.7.2.)

Edit: The netmirror mirror has synced fine too,
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
ICE
Regular
Posts: 240
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE »

I've played with the plugin "serendipity_event_imageselectorplus" and CKEditor. The CKEditor does not allow

Code: Select all

<mediainsert>
   <gallery name="MyHolidays/" />
   <media type="gallery" />
</mediainsert>
in entries and deletes the code automatically ...

These tags should be added to the allowed tag list in ckeditor.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

This is for what the Plugin Option ACF turn OFF is for. Please read my general notes about ACF, futures, and "security", which I had to write about in another thread:
Timbalu wrote:This will not work! This is, while all these new CKEDITOR versions have a filter running, called ACF.
(*) What Impact Does ACF Have on Plugins?

Advanced Content Filter (ACF) is a set of rules that determine which editor features will be available to the user. It limits and adapts input data so it matches the editor configuration in the best possible way. It may also deactivate features which generate HTML code that is not allowed by the configuration.

How does it affect plugins? If your plugin generates content, you will need to update it so that it would extend the default CKEditor filters and make the editor accept this content.
So something like plain media iframes (youtube videos), or code like the one you are trying to insert, will never be allowed. For people not caring about this security feature by CKEDITOR, I added an option to the plugins config, to turn that off. Now every code, or iframe, or changed classname, etc will be executed, saved and reloaded, like you have inserted it. Having ACF On (default), CKEDITOR does not show forbidden markup again after you saved and reloaded that editor page.

The new version 1.3.x Series will take care of the video iframe things, without the need to turn off ACF.
Timbalu wrote:In a future plugin version, customizing CKEDITOR and ACF, I (maybe) will add another config option to set a conditional tags array, allowing to set individual Allowed Content Rules and possible Content Transformations.
Jade wrote:I assume there is no security vulnerability in CKEditor if I turn ACF off if its only used in create entries? (assuming only authorized users have access) or does the same function protect reader submitted comments?
Well, I named that a "security feature", but in detail it is something else .... It's more some sort of "Strong Customizable Housekeeper, interacting tags", which also takes care about "bugs" and "dirties"... :wink:
http://ckeditor.com/blog/CKEditor-4.1-Released
http://docs.ckeditor.com/?_escaped_frag ... ent_filter
http://ckeditor.com/blog/CKEditor-4.1-RC-Released (slightly different in the ACF description)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
ICE
Regular
Posts: 240
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE »

:oops: okay, didn't read it ... tl;dr

doesn't work either:

This

Code: Select all

<mediainsert>
   <gallery name="Fotos/" />
   <media type="gallery" />
</mediainsert>
was transformed to this:

Code: Select all

<mediainsert> <gallery name="Fotos/"> <media type="gallery"> </media></gallery></mediainsert>
I will not bother you ...
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

Beside it chokes the linebreaks, removing the single tag slashes is wellformed HTML5, AFAIK (even if adding a closing media tag, which is definitely odd, I see!)
Isn't that read correctly by your template and Browser?

It looks like some kind of a "bug" in ckeditor itself, since there are some "similar" notes by drupal users.

For the moment I do not know an answer to this.
Could you populate the ckeditor forum with that question? I would really like to have an answer.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
ICE
Regular
Posts: 240
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE »

I've googled a lot and found for example this:
http://wordpress.org/support/topic/plug ... ag-closing
and played with this config settings but didn't find a regex that works.

Here are more examples for regex: http://cfprogrammer.blogspot.de/2012/10 ... gs-in.html

I tested some but nothing works.

It seems, there is no solution for the auto closing tags.

I think it should be easier to alter the serendipity_event_imageselectorplus plugin rather than ckeditor :lol: :oops: :roll: :roll:
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

And you say it doesn't work with the added </media> tag, does it?

We might do this, change https://github.com/s9y/additional_plugi ... s.php#L765 to:

Code: Select all

$entry_parts = preg_split('@(<mediainsert>[\S\s]*?</mediainsert>)@', str_replace('</media>', '', $text), -1, PREG_SPLIT_DELIM_CAPTURE);
You should still ask this in the ckeditor forum, since it would be very nice to have some sort of "command interpreter" (plugin), which leaves everything included by that totally untouched and shows an icon for it in wysiwyg-mode textareas instead.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply