Item10082: Checkin WysiwygCKPlugin into the trunk
Priority: Normal
Current State: New
Released In: n/a
Target Release: n/a
--
AlexanderStoffers - 26 Nov 2010
Upload
CKEditorPlugin to the trunk
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
into:
# 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
%RENDERZONE{"ckscript"}%
in the Content Block of your Edit Template, eg.
PatternSkin:
%{ CONTENT }%
.
.
.
%RENDERZONE{"ckscript"}%
%TMPL:END%
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
TML2HTML.pm.
--
AlexanderStoffers - 30 Nov 2010
The changes to
TML2HTML.pm
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