358 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Hey who got The Handsome Champion?
Thu, Jul 24th 2014 267
SoftLayer + IBM: One Year Update
Wed, Jul 2nd 2014 330
Streaming files to IE8? You may want this.
Fri, Jun 20th 2014 175
Let me tell you some things about the Irish...
Thu, Jun 12th 2014 117
A Few Pics from Ireland
Wed, Jun 11th 2014 98
Our Grand Ireland Itinerary: Nights 8-11
Tue, Jun 10th 2014 112
Our Grand Ireland Itinerary: Nights 12-14
Tue, Jun 10th 2014 119
Top 10
Using CKEditor 4: Part 6 - Caveats: Jumping Editors, More on Validation, Going iPad "Only," and 32K Limits
Fri, Mar 14th 2014 347
SoftLayer + IBM: One Year Update
Wed, Jul 2nd 2014 330
Hey who got The Handsome Champion?
Thu, Jul 24th 2014 267
Use "secret" XPages for controlling scoped variables
Thu, Sep 20th 2012 180
Streaming files to IE8? You may want this.
Fri, Jun 20th 2014 175
Setting Up The IBM HTTP Server with Domino 9
Wed, May 29th 2013 154
Add Custom HTML Templates to Your CKEditor
Wed, Oct 16th 2013 154
FIX: "Infinite" IE windows from mailto links
Thu, Oct 17th 2013 143
More security. That's what I'M talkin' about!
Mon, Mar 31st 2014 136
Using CKEditor 4: Part 4 - Designing for Read/Edit Modes and Using Validation
Wed, Mar 12th 2014 133


Be careful with empty CKEditor rich text fields
   


The CKEditor is very handy in XPages since it saves the content as MIME which can be processed as such in other places in your application. However you should be aware of how it operates so you can code around its behavior.

In 8.5.3 the CKEditor for rich text controls has been updated.

1. If you never enter any information into the field, then the field is a text field even if the document has been saved.

2. If you enter a single space and save the document, then the field is a MIME object and remains so even if you remove the content and re-save the document.

SOLUTION:

Use something similar to the code below to discover if the field is actually MIME or just plain empty text:


if(doc.getFirstItem("aRichTextField").getType()==Item.MIME_PART){
x=doc.getMIMEEntity("aRichTextField").getContentAsText();
}else{
x="";
}


NOTE: I have already upgraded everything to 8.5.3 so I cannot accurately verify but I believe this was not the case in 8.5.2 because after upgrading some existing/working suddenly stopped working and this was the cause.

If anyone knows differently about 8.5.2, please let me know.

---------------------
http://xpagetips.blogspot.com/2011/10/be-careful-with-empty-ckeditor-rich.html
Oct 28, 2011
35 hits



Recent Blog Posts
267


Hey who got The Handsome Champion?
Thu, Jul 24th 2014 1:11p   Russell Maher
My IBM Champion swag just arrived and I ripped into it like it was Christmas then got on a real roll with PhotoBooth! Thank you to IBM for having the Champion program and thank you to Oliver and Amanda for providing us with some really nice things. Very cool. The stuff is cool, no doubt about that, but it is still the honor of being selected an IBM Champion that is really really cool and I am very grateful. [read] Keywords: ibm
330


SoftLayer + IBM: One Year Update
Wed, Jul 2nd 2014 3:11p   Russell Maher
About a year ago I posted a couple of times regarding IBM's acquisition of SoftLayer. Received email this morning heralding the one year anniversary of the acquisition and I thought I would take a few moments to give my take as a SoftLayer customer. I was very concerned a year ago when I heard the SoftLayer announcement because, while I sincerely believe the financials of IBM's acquisition of Lotus Software back in 1995 are right in line with IBM's business track record (which is to say the [read] Keywords: ibm lotus application email
175


Streaming files to IE8? You may want this.
Fri, Jun 20th 2014 9:11a   Russell Maher
An easy XPages tip for a lazy Friday... Got SSL? Streaming files using an XAgent? You're gonna' get an error unless you do something like this: if(context.getUserAgent().isIE(8, 8)==false){ response.setHeader("Cache-Control", "no-cache"); } Apparently IE8 don't like no caching when streaming files over SSL. [read] Keywords: xpages
117


Let me tell you some things about the Irish...
Thu, Jun 12th 2014 6:12a   Russell Maher
To tie off my Ireland Itinerary series of posts I wanted to close with some thoughts on the Irish people and country. I have a curiosity about people that I do not often have the chance to indulge generally because I am too busy and many people find my inquisitive intensity to be unnerving but when I have the chance, the time and the opportunity I really try to learn as much about others as possible and am often rewarded with some valuable perspectives. What I found in Ireland is that the peop [read] Keywords:
98


A Few Pics from Ireland
Wed, Jun 11th 2014 6:12a   Russell Maher
Some of my favorite pics from our Ireland trip... They run anybody during elections! At Newgrange Giant's Causeway Sheeps At Harvey's Point they added this small fireplace room in 2004. It is so awesome! Kylemore Abbey Cows on the road Cows in a field. Banded Galloways Dinner at Hayfield Manor Where the Mahers are from Rock of Cashel Actually drank some whiskey...well Ginger Ale with some whiskey This is really good! Too much to drink? Fishing pole and an an MG [read] Keywords: application blogger google
112


Our Grand Ireland Itinerary: Nights 8-11
Tue, Jun 10th 2014 2:15p   Russell Maher
This is the second part in a series of posts about our trip to Ireland. Day 1 Itinerary Day 3 Itinerary Nights 8-11 Our first seven nights took us from Dublin to Trim to Northern Ireland to Donegal and then toward Galway. Nights 8-11 took us to the Dingle Peninsula, through part of the Ring of Kerry then over to Cork. Dingle The Dingle Peninsula is stunning. The road out on the peninsula offers some of the most stunning coastline you'll ever encounter. Really something to see. Sadly [read] Keywords:
119


Our Grand Ireland Itinerary: Nights 12-14
Tue, Jun 10th 2014 2:15p   Russell Maher
This is the third post in a series of posts about our Ireland itinerary. Day 1 Itinerary Day 2 Itinerary Nights 12-14 Our last drive took us from Cork, where we stayed at the lovely Hayfield Manor, to Dublin via Blarney Castle, where we both kissed the Blarney Stone, to Tipperary (the ancestral location ft the Mahers), to the Rock of Cashel, the lovely town of Kilkenny and then to Dublin where we dropped off the rental car after checking in to fabulous Westbury Hotel. Blarney Castle [read] Keywords: wiki




94


Our Grand Ireland Itinerary
Mon, Jun 9th 2014 9:10p   Russell Maher
Now I've been to Ireland. Karen and I spent two weeks there and got back last Saturday. Karen's travels plus my travels plus our travels adds up to a fairly impressive list of places (for Americans anyway) but, shockingly, neither of us had ever been to Ireland and so, for the first time, we travelled to a place where neither of us had ever been before. By the end of the trip, it is fair to say that, although we plan on returning to Ireland in the future, if we never make it back, we've gi [read] Keywords: wiki
136


More security. That's what I'M talkin' about!
Mon, Mar 31st 2014 11:11p   Russell Maher
Just deployed a Citrix Netscaler Platinum into our SoftLayer infrastructure. While we are quite confident in Domino and XPages security, a recent application vulnerability scan highlighted a couple of areas where Domino comes up a little short. For example, not being able to set the SessionID cookie as Secure (SSL only) could be a bit of an issue under the right circumstances. I have been evaluating the Netscaler for a few weeks and pretty much it's a web application administrator control fr [read] Keywords: domino xpages application citrix network security
347


Using CKEditor 4: Part 6 - Caveats: Jumping Editors, More on Validation, Going iPad "Only," and 32K Limits
Fri, Mar 14th 2014 6:14a   Russell Maher
This is Part 6 (final part) of a series of videos that illustrate our solution to implementing CKEditor 4 in our XPages application. You can find links to all of the videos in Part 1. In the last video I showed how this technique looks on an actual iPad..In this video I discuss some things to be aware of when working with the CKEditor, either CKEditor 4 or the currently installed XPages version (3.6.6.2). CKEditors jump! Validation usually in play in XPage apps will probably require a more e [read] Keywords: script library xpages application blogger google




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition