This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 20, 2012, 3:48 PM
37 Posts

Enable spell check into Ckeditor Xpages

  • Category: Dojo and Client Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role:
  • Tags: ckeditor,speel check
  • Replies: 1
It's possible?
 
CKeditor have this function:official guide ckeditor
Jan 30, 2012, 11:27 AM
261 Posts
Re: Enable spell check into Ckeditor Xpages
Daniele,
 
The version of CKEditor used in 8.5.3 is 3.5(.x). I recently needed a feature in the 3.6 release (readOnly) so I downloaded the latest CKEditor version and stored it in the domino/html folder on my server. In that version I could easily activaty the spell check option (scayt). The code needed to load a custom CKeditor version and enable the spell check option can be found below.
 
I did a quick test using the embedded CKEditor release (adding scayt_autoStartup and changing the disableNativeSpellChecker parameters in the config.js file), but wasn't able to activate it.

 
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
    <xp:this.resources>
        <xp:headTag tagName="script">
            <xp:this.attributes>
                <xp:parameter name="src" value="/ckeditor36/ckeditor.js" />
                <xp:parameter name="type" value="text/javascript" />
            </xp:this.attributes>
        </xp:headTag>
    </xp:this.resources>

    <xp:this.data>
        <xp:dominoDocument var="document1" formName="fEditorDemo"></xp:dominoDocument>
    </xp:this.data>
    
    <xp:inputTextarea id="inputTextarea1" value="#{document1.body}"></xp:inputTextarea>

    <xp:scriptBlock id="scriptBlock2">
        <xp:this.value><![CDATA[CKEDITOR.replace( '#{id:inputTextarea1}',
            {
                uiColor : '#E2EBF1',
                toolbarCanCollapse : true,
                toolbar :
                [
                    { name: 'basicstyles',    items : [ 'Bold','Italic','Underline','Subscript','Superscript' ] },
                    { name: 'styles',        items : [ 'Format','Font','FontSize' ] },
                    { name: 'paragraph',    items : [ 'NumberedList','BulletedList','-','Outdent','Indent' ] },
                    { name: 'paragraph',    items : [ 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
                    { name: 'insert',        items : [ 'Table','SpecialChar' ] },
                    { name: 'document',        items : [ 'Source' ] }    
                ],
                readOnly : false,
                // Disables the built-in spell checker while typing natively available in the browser (currently Firefox and Safari only).
                disableNativeSpellChecker : true,

                // If enabled (true), turns on SCAYT (SpellCheckAsYouType) automatically after loading the editor.
                scayt_autoStartup :true
        });    ]]></xp:this.value>
    </xp:scriptBlock>
    
    <xp:button value="Save" id="button1"><xp:eventHandler event="onclick" submit="true" refreshMode="complete">
        <xp:this.action>
        <xp:save></xp:save>
        </xp:this.action></xp:eventHandler>
    </xp:button>

</xp:view>


 
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal