How to insert graphic into your Lotus Symphony presentation

John Head recorded this video showing an innovative approach to inserting graphics from a Lotus Notes image repository straight into your Lotus Symphony presentation.

Advertisements

How to use FCKEditor

To continue with my mini JavaScript-text-editor kick, I moved on to FCKEditor.

FCKEditor is another very popular JavaScript text editor.  (Since I first started playing with it, FCKEditor got reborn in its 3.0 version, now known as CKEditor.  Not sure why the ‘F’ was dropped. Perhaps, as the result of too many off-color jokes.)

Much like TinyMCE, CKEditor boasts to be a lightweight editor that works in any browser.  Its objective is to deliver desktop-like text editing functionality in a browser.  It is fully customizable and does a great job processing content pasted from Word.  The last part is a big selling point, allowing people to create content in Word first, using all the authoring and revision tools, and then paste the final version into the browser.

To add CKEditor to your Domino application is rather very simple.

  1. First of all, go here and download the version of your choosing.
  2. Extract the downloaded zip file and copy its contents to the html directory of your Domino server.  It might be something like d:\lotus\domino\data\domino\html.  The default directory name will be ckeditor.  You can rename it, if you like, just remember what it is as you will need to reference it in the initialization code of your form.
  3. Next, build your form.  Create at least 1 RichText field.  Use the Property HTML tab to give it an ID.
  4. Enclose the field inside of a DIV tag.  Using passthru HTML open the DIV tag before on the line before the field and close it on the line after.
  5. Now, you’re ready to add CKEditor to your form.  In the HTML Head section of the form, add this 1 line of code:
    “<script type=\”text/javascript\” src=\”/fckeditor/fckeditor.js\”></script>”
    Make sure that the path to you editor matches your directory structure, in case you renamed it for whatever reason.
  6. Add the function to load the editor, to the OnLoad event of your form.
    if ( document.URL.search(/OpenDocument/) == -1 )
    {
    var oFCKeditor = new FCKeditor( ‘MyTextarea’ ) ;
    oFCKeditor.BasePath = “/FCKeditor/” ;
    oFCKeditor.ReplaceTextarea() ;
    }

    Be sure to use the ID of the RichText field you want the editor to attach to on the declaration line.  In my case, my field was called MyTextarea.

  7. Add a Save button somewhere and you’re all set.

Happy text editing.

 

How to use TinyMCE

One of the more frustrating thing about a web application is that you can never truly duplicate rich text formatting capabilities of a desktop client.  And when you’re web enabling a Lotus Notes application, the difference becomes even more obvious.  Luckily, there are various very light JavaScript text editors, which offer more functionality than the standard out-of-the-box Domino text editor.  One of those editors is a very popular TinyMCE.

TinyMCE is used by many different web content managers, including Django, Drupal, Joomla and this very site — WordPress.  And you can use it inside of your Domino applications.  (I know that some folks been doing this for years, but since I’ve never used a 3-rd party editor in my applications before, so this is new to me.)

The nice thing about TinyMCE is that it is a lightweight WISYWIG editor, which is platform independent.  It is easy to integrate into any application with only few lines of  code.  And it runs under pretty much any browser.

  1. So, first of all, go here and download the latest version of TinyMCE.  You can even download various language packs, if you need a different language version of the editor.
  2. Extract the downloaded zip file and copy its contents to the html directory of your Domino server.  It might be something like d:\lotus\domino\data\domino\html.  The default directory name will be tinymce.  You can rename it, if you like, just remember what it is as you will need to reference it in the initialization code of your form.
  3. Next, build your form.  The easiest way to deploy a TinyMCE editor is to have hook into any text area on your form.  So create at least 1 RichText field.  If you want to control its appearance, you can use the style field on the HTML property tab.
    Body Field
  4. Now, you’re ready to add TinyMCE to your form.  In the HTML Head section of the form, add this 1 line of code:
    “<script type=\”text/javascript\” src=\”/tinymce/jscripts/tiny_mce/tiny_mce.js\”></script>”
    Make sure that the path to you editor matches your directory structure, in case you renamed it for whatever reason.
  5. Add the function to initialize the editor to the JS Header section of the form.  The function below loads the TinyMCE editor with all available options and buttons.  The beauty of this editor is that you can truly control what options and abilities you will give to your users.  Things like a spell checker, for example, are a must.  But you may not want to allow your users to create tables.
  6. tinyMCE.init({

    mode : “textareas”,

    theme : “advanced”,

    plugins : “safari, pagebreak, style, layer, table, save, advhr, advimage, advlink, emotions, iespell, inlinepopups, insertdatetime, preview, media, searchreplace, print, contextmenu, paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, template, wordcount”,

    // Theme options

    theme_advanced_buttons1 : “save, newdocument, |, bold, italic, underline, strikethrough, |, justifyleft, justifycenter, justifyright, justifyfull, styleselect,formatselect,fontselect,fontsizeselect”,

    theme_advanced_buttons2 : “cut, copy, paste, pastetext, pasteword, |, search, replace, |, bullist, numlist, |, outdent, indent, blockquote, |, undo, redo, |, link, unlink, anchor, image, cleanup, help, code, |, insertdate, inserttime, preview, |, forecolor, backcolor”,

    theme_advanced_buttons3 : “tablecontrols, |, hr, removeformat, visualaid, |, sub,sup, |, charmap, emotions, iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen”,

    theme_advanced_buttons4 : “insertlayer, moveforward, movebackward, absolute, |, styleprops, |, cite, abbr, acronym, del, ins,attribs,|,visualchars,nonbreaking,template,pagebreak”,

    theme_advanced_toolbar_location : “top”,

    theme_advanced_toolbar_align : “left”,

    theme_advanced_statusbar_location : “bottom”,

    theme_advanced_resizing : true

    // content_css : “styles/editor.css”

    })

  7. Lastly, include the TinyMCE save function in your Submit code.
    tinyMCE.triggerSave(false, false);
  8. You’re pretty much done.

Now, keep in mind, that the text coming out of TinyMCE will be all HTML formatted.  This is not something that will look good opened in the Notes client, so, primarily, this works well for web only applications.  For applications used both in the browser and in the client, you may want to do some MIME to RichText conversion.

    GRANITE in the suburbs?

    If you are a Lotus professional in or around Chicago, did you ever you feel that you wanted to come to one of the GRANITE meetings but didn’t want to make the trip downtown?  Roy Rumaner is looking to start a suburban chapter of GRANITE.  He has a discussion going on LinkedIn.

    So, if you’re interested, join the discussion and show your support for the idea.  And if you’re not already on LinkedIn, this is a good opportunity to join and connect with other professionals around our town.

    Phishing SPAM and it’s from IRS

    irs phishing

    This is a new one for me.  And the link, of course, doesn’t really go to IRS.

    More Lotus-related jobs are being advertised

    If you are on LinkedIn and are a member of some of the Lotus-related groups, you should be receiving emails notifying you of new group discussions.  It seems that in the last few weeks there’s been a surge in new Lotus-related jobs being advertised on the forums.  Admittedly, a large number of these sound like mid and long term contract positions, but they are positions and openings never the less.

    I don’t know about you, but I’m reading this as a positive sign, a sign of change.

    And of course, if you’re actively looking for a job and you’re not on LinkedIn, you really should be.  These jobs and positions are not listed in your weekend classifieds.