1
votes

In an Xpage running on Domino 9.0.1 I'm using a rich text control with some custom toolbar configuration using the control's "attr" property as it is described here: https://frostillic.us/f.nsf/posts/quick-and-dirty-ckeditor-toolbar-setup-for-xpages

I added the link toolbar template using

<xp:this.attrs>
    <xp:attr name="toolbar">
        <xp:this.value><![CDATA[[["Link", "Unlink", "Anchor"]]]]></xp:this.value>
    </xp:attr>
</xp:this.attrs>

All three buttons are displayed fine, esp. I'm able to define an anchor link target.

But trying to reference the anchor target I find that the Link dialog is somewhat incomplete as I can't define my link to use a relative target on the same page. I tried entering a reference in the dialog's URL field as #myAnchorId, but that results in a link looking like this:

<a href="http://#myAnchorId">...</a>.

Here's an image of the dialog that pops up from my Xpage when I hit the "URL link" button:

enter image description here

And this is what the dialog looks like that I can test from the CKEditor Samples page:

enter image description here

I'm aware that the samples page uses CKEditor V 4, so the dialog is somewhat different, but even V 3.6 should be able to reference anchor links using the dialog.

I already looked up on the installed ckeditor's version; \DominoData\domino\html\ckeditor\version.txt says:

cke_version=3.6.6.2
cke_revision=20130606-1534

Question is: what's missing here? Do I have to somehow modify the dialog?

2

2 Answers

2
votes

Oh my, finally got it to work; @IBM: this feature truly could use some proper documentation! I'll mark this answer as a community wiki.

Indeed a different dialog is used here, which btw appears to apply to all the dialogs in use with Domino's CKEditor implementation. The trick in my case is to use one of the custom toolbar items instead of the standard one; up to now I found three of those customized items:

  • use MenuLink instead of the standard Link item; this item consists of two sub items ('URL Link' and 'Anchor Link'), each calling its own dialog version; the resulting toolbar definition then looks like this: ['MenuLink', 'Unlink', 'Anchor']

enter image description here

  • use MenuPaste instead of the standard Paste item; again, this
    item consists of two sub items ('Paste' and 'Paste as text'), again each calling its own dialog version

enter image description here

  • use LotusSpellChecker to add IBM's own spell checking feature, where CKE's standard spell checker isn't working

I found hints to those three custom items inside my local \DominoData\domino\html\ckeditor\config.js. Don't know if those are all custom items available to day.

EDIT:

IBM's Domino Designer Xpages User Guide mentions another means of customizing the toolbar; the section unfortunately is incorrect in describing the options for the toolbarType attribute: be aware that all named types must start with capital letters, e.g. Basic, Slim, Medium, Large, Full, while the also mentioned Lite type isn't working at all; mistyping or using a non-existing value results in the editor not being displayed at all.

1
votes

The link dialog that you're using is not the default one, so you should check how to modify it or replace it with the default one.