9.0.1FP2 breaks CKEditor and the BootstrapSkin

Friday, August 22, 2014 at 1:25 PM UTC

I just experienced a problem using the cool CKE Bootstrap Skin (https://github.com/Kunstmaan/BootstrapCK4-Skin) after the upgrade to fixpack 2 these days. I just wanted to create a new post here as I saw: no CKE anymore to see in my XPage Stirnrunzeln

Even the installation of the lates version from Github did not fix this issue. As I am not familiar enough to troubleshoot this issue I just removed the skin wherever I used it in my Bootstrapped applications *sigh*

So if you use e.g. a version of my FileSilo or any other apps from me using Bootstrap please check if they work after the upgrade. Otherwise remove the Dojo-attribute from the richtext control called "skin".

EDIT

I saw this tweet this morning and the comments point out that info, too: https://twitter.com/BGleesonIE/status/502749076497391617

And yes, the line

CKEDITOR.skins.add( 'BootstrapCK-Skin', (function()

is the one that causes the error so commenters may be right. Per Lausten linked me to this one and this is still working: http://ckeditor.com/forums/Skins-and-Icon-Sets/BootstrapCK-Skin

But not enough

The Dojo attribute "toolbarType" with the value "Full" doesn't work anymore, too. I miss tools such as styles (cite, code, typewriter stuff) and the source tab. Per Lausten also found another issue: http://per.lausten.dk/blog/2014/08/xpages-and-domino-9-0-1-fp2-upgrades-to-ckeditor-and-dojo.html

The proof

I just reverted one of my servers back to 901FP1 - and now the Richtext Control works like a charm though I cannot use the Bootstrap-Skin that Per pointed out.

See what the differences are:

This is with FP1

This is with FP2

This is what my implementation looks like:

<xp:inputRichText id="inputRichText1"
                                value="#{document1.postBody}" htmlFilter="identity"
                                htmlFilterIn="identity">
                                <xp:this.dojoAttributes>
                                    <xp:dojoAttribute name="width"
                                        value="900">
                                    </xp:dojoAttribute>
                                    <xp:dojoAttribute name="toolbarType"
                                        value="Full">
                                    </xp:dojoAttribute>
                                    <xp:dojoAttribute
                                        name="extraPlugins" value="autogrow">
                                    </xp:dojoAttribute>
                                    <xp:dojoAttribute name="skin">
                                        <xp:this.value><![CDATA[#{javascript:return "";
return @ClientType().equals("Web") ? "BootstrapCK-Skin,/"+database.getFilePath()+"/bscke/" : ""}]]></xp:this.value>
                                    </xp:dojoAttribute>
                                </xp:this.dojoAttributes>
                                <xp:this.dojoType><![CDATA[#{javascript:return "";
return @ClientType().equals("Web") ? "org.openntf.filesilo.CKEDITOR" : ""}]]></xp:this.dojoType>
                            </xp:inputRichText>

As you can see I deactivated the usage of the Bootstrap skin.

Conclusion

After some dabbling and testing and also with the help from the community (esp. Per) I now can resume the update with the following:

  • You can use Fixpack 2 if you adapt the changes to the Dojo attributes to your Richtext controls
  • You can use the Bootstrap skin (see link above)
  • You can both use the attributes "toolbarType" and "toolbar" without getting errors to be compatible with 9.01FP1 and FP2
  • You can set the toolbar options to valid values as "Slim", "Medium", "Large" and "Full"
  • You can even use the new spell checker (the dialog is also skinned if you use the Bootstrap skin)

After all: a lot of hassle for nothing - if you know how or you know someone who knows it Winken

I found a workaround to keep CKEditor working with FP1 and FP2 (FP1 is without a custom skin though)






Latest comments to this post

Per Henrik Lausten wrote on 24.08.2014, 21:36

Just discovered: Instead of toolbarType just use toolbar and set it to e.g. Full Smile

 Link to this comment
Paul Withers wrote on 22.08.2014, 15:39

Brian Gleeson confirmed earlier today that in order to support Internet Explorer 11, CK Editor has been upgraded to 4.3.2. I'm not sure what's changed with that version, but it sounds like that's the root of the problem. Possibly something to do with how skins are applied or perhaps that particular skin doesn't conform to the model for skins in 4.3.2??

 Link to this comment
David Leedy wrote on 22.08.2014, 15:39

They updated CKEditor and Dojo in the fix pack.  I believe to CKEditor 4.3.2 and Dojo 1.9.2.

 Link to this comment

Leave a comment right here