You are here: Foswiki>Tasks Web>Item10082 (22 Apr 2012, GeorgeClark)Edit Attach

Item10082: Checkin WysiwygCKPlugin into the trunk

Priority: Normal
Current State: New
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: CKEditorPlugin
Reported By: AlexanderStoffers
Waiting For: AlexanderStoffers
Last Change By: GeorgeClark
-- AlexanderStoffers - 26 Nov 2010

Upload CKEditorPlugin to the trunk

To get the CKEditorPlugin connected you need to change in the WysiwygPlugin:

1. Change - Function _liftOut :

sub _liftOut {
     #Modac: Customization for CKEditor
    my ( $this, $text, $type, $encoding, $href ) = @_;
    my %options;
    if ( $type and $type =~ /^(?:PROTECTED|STICKY|VERBATIM)$/ ) {
        $options{protect} = 1;
    if ( $encoding ) {
       $options{encoding} = $encoding;
    if ( $href ) {
       $text = $this->_unLift($text);
       $href = $this->_unLift($href);
       $text = $text = '<a href="' . $href . '">' . $text . '</a>';

2. Change in _getRenderedVersion:

Change the
  # Handle [[][]] and [[]] links 

    # Handle [[][]] and [[]] links

    # Modac Changes for CK Editor:
    # Handle [[]]
    $text =~ s/(\[\[([^\]]*)\]\])/$this->_liftOut($2, 'LINK', 'span', $2)/ge;
    # Handle [[][]]
    $text =~ s/(\[\[([^\]]*)\](\[([^\]]*)\])?\])/$this->_liftOut($4, 'LINK', 'span', $2)/ge;

Customize Edit Template:

You can either use the edit.pattern.tmpl in the Repository or you can add


in the Content Block of your Edit Template, eg. PatternSkin:



As I will be working on TinyMCEPlugin, among other things, I've created a separate task for the WywisygPlugin change. Item10089

-- PaulHarvey - 27 Nov 2010

If you guys want to test CKEditorPlugin, you have to replace these snippets in

-- AlexanderStoffers - 30 Nov 2010

The changes to here breaks a lot of the Wysiwyg unit tests. However the patch attached to Item1396 seems to allow wysiwyg editing of links, and only breaks 2 tests, both of which appear to be expected, and can be fixed. The Item1396 patch works fine with TinyMCEPLugin, but I have not tried it yet with CKEditor.

-- GeorgeClark - 22 Apr 2012

ItemTemplate edit

Summary Checkin WysiwygCKPlugin into the trunk
ReportedBy AlexanderStoffers
Codebase trunk
SVN Range
AppliesTo Extension
Component CKEditorPlugin
Priority Normal
CurrentState New
WaitingFor AlexanderStoffers
Checkins CKEditorPlugin:1576efdb314c Rev 10122 not found Rev 10123 not found Rev 10124 not found CKEditorPlugin:c469b3a57ddf
TargetRelease n/a
ReleasedIn n/a
Topic revision: r13 - 22 Apr 2012, GeorgeClark - This page was cached on 19 Oct 2020 - 20:32.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy