Personal tools
You are here: Home Documentation Tutorials Content Creation with Kupu and Other WYSIWYG Editors
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Content Creation with Kupu and Other WYSIWYG Editors

Note: Return to tutorial view.

This tutorial introduces the Kupu interface and explains how to insert images, create FAQ pages, and use Kupu's ResolveUID feature. It was written by Quintagroup content manager for end-users and is compatible with Kupu 1.4.x.

WYSIWYG Editors in Plone

Kupu, Epoz, and FCK editor

Several WYSIWYG editors can be used in Plone, including Kupu, Epoz, and FCK editor. However, not all of the editors are compatible with the current version of Plone.

Multiple WYSIWYG editor packages can be installed in a single Plone instance which allows site members to choose their favorite editor in  the Content editor setting of their personal Preferences, as shown below:
 

content-editor

 
Most WYSIWYG editors are based on similar principles, with interfaces that mimic those of popular word processing applications. These familiar toolbars and icons help the non-technical users who are not well-versed in HTML code to transition to editing content in Plone.

What are the differences between WYSIWYG editors?

  • HTML code formed.
  • Insert image interface and functionality.
  • HTML clean-up can be done with the help of special icon on a toolbar, or just after clicking 'save' button.
  • WYSIWYG editor default configuration can have or lack change color functionality.

 

FCK Editor

 

 

FCK

 

Epoz

 

Epoz

 

Kupu 

 

kupu

Introduction

An introduction to the Kupu content editor

What is the aim of this tutorial?

This tutorial is devoted to content management with Kupu. It introduces the Kupu interface and explains how to insert images, how to create FAQ pages, and why to use ResolveUID. This tutorial is aimed to help a content manager to get acquainted with WYSIWYG editors in Plone.

This tutorial is a part of Plone Book for Content Managers - a tutorial digest on the most recent issues. As this book is constantly expanding, you can monitor the renewals made to it subscribing to my blog.

In case any question concerning editing with Kupu arises during your work, something is not clear for you in any article of this tutorial, you have noticed any drawbacks or have suggestions about how to improve it, you are welcomed to contact Olha Pelishok.

If your questions and suggestions concern Kupu in general, contact the Plone General mailing list. Duncan Booth usually settles such issues. He has also done a tremendous amount of very high quality work about Kupu. Duncan Booth took over after Philipp von Weitershausen had done the initial Plone integration.

Getting back to the Kupu content editor, let's start with its general description.

What is Kupu?

Kupu is an open source client-side editor for Firefox, Netscape and Internet Explorer. Inspired by Maik Jablonski's Epoz editor, it was written by Paul Everitt, Guido Wesdorp and Philipp von Weitershausen to improve the JavaScript code and architecture, standards support, support for webservers other than Zope (which was the original target platform for Epoz), customization, and other issues.

Kupu's features:

  • Kupu is easy to integrate into a variety of CMS.
  • Kupu can be easily customized and extended.
  • High-tech and up-to-date Kupu uses CSS in favor of HTML for layout and presentation.

Kupu Button Index

Description of the toolbars and icons in Kupu 1.4.x

A typical Kupu toolbar looks like this:

toolbar

 

The following table describes the function and output of each button.

Icon Function Description Example Example resultant HTML code
save save
Saves changes

bold bold Bolds selected text text <strong>text</strong>
italicize italicize Italicizes selected text text <em>text</em>
subscript subscript Transforms selected text to subscript textscript text<sub>script</sub>
superscript superscript Transforms selected text to superscript textscript text<sup>script</sup>
text-color text color Colors selected text

background-color background color Color background of the selected text

left left justify Aligns the selected text to the left text <p align="left">text
<br /></p>
center center justify Aligns the selected text to the center of the screen. text <p align="center">text
<br /></p>
right right justify Aligns the selected text to the right text <p align="right">text
<br /></p>
numberedlist numbered list Creates a numbered list
  1. line1
  2. line2
  3. line3
<ol><li>line1</li>
<li>line2</li>
<li>line3</li></ol>
butteledlist bulleted list Creates a bulleted list
  • line1
  • line2
  • line3
<ul><li>line1</li>
<li>line2</li>
<li>line3</li></ul>
list passage list passage Creates a definition list
line1
line2
line3
line4
<dl>
<dt>line1</dt>
<dd>line2</dd>
<dt>line3 </dt>
<dd>line4 <br />
</dd></dl>
outdent decrease quote level Moves an indented section of text one tab to the left text
indent increase quote level Indents the selected text by one tab text <blockquote>text<br /></blockquote>
insert image insert image Inserts an image into your document

internal-link insert internal link Creates a link to another object within Plone site text <a title="filename" href="front-page">
text</a>
external link insert external link Changes a link to an external site text <a href="http://...../">
text</a>
insert anchors insert anchors Creates an anchor point for linking between sections of a single page

beginning

text text text text text
to the top
<h3 class="Subheading">
<a name="beginning">
</a>beginning</h3>
text text text text text
<a href="#beginning">
to the top</a>
insert table insert table Inserts a table
first
second
third
fourth fifth sixth

<table class="plain">
<tbody><tr>
<td>first<br /></td>
<td>second<br /></td>
<td>third </td></tr>
<tr>
<td> fourth</td>
<td>fifth</td>
<td>sixth </td></tr>
</tbody>
</table>
undo undo Undo the last edit

redo redo Redo the last undo action

html switch between visual editor and HTML view


text heading text heading Chooses headings

text heading-all text headings Normal text <p>text</p>
Heading

text

<h2 class="Heading">text</h2>
Subheading

text

<h3 class="Subheading">text</h3>
Literal
text
<pre>text</pre>text
Discreet text <p class="discreet">text</p>
Pull-quote
text
<div class="pullquote">text</div>
Call-out

text

<p class="callout">text</p>
Page break (print only)
<div class="pageBreak">text</div>
Clear floats (remove style)
<div class="visualClear">text</div>
Highlight
text <span class="visualHighlight">text</span>
zoom zoom Zooms the editing window to fill the page

remove link remove link Removes an existing link

remove-image remove image Removes an existing image

In case you Kupu toolbar does not include the necessary icons, follow the next part  of this tutorial to learn how to Customize Kupu Toolbar.

Kupu Toolbar Customization

Description of the toolbar customization for Kupu 1.4.x

A usual Kupu toolbar looks this way:

toolbar-kupu

 

It consists of the buttons, each of them suit this or that purpose. Their functions and buttons are described in a Kupu Button Index chapter.

In case you don't use some of the buttons, there is no need for them to be on the toolbar. You can exclude them from the toolbar, so that they don't interfere with you.

To do this you have to enter Site Setup, find kupu-visual-editoramong Add-on Product Configuration, press on it. In the opened toolbar righthand choose toolbar tab:

 

 toolbar1

 

Options suggested allows you to customize Kupu toolbar according to your needs. You may  choose Global button visibility that allows you to enter an expression to control the visibility of all buttons together. Go lower and you will find Button visibility: button-visibility

 

Here you can select those items you want to be displayed on the Kupu toolbar. Or remove ticks from those you don't need.

Now let's, for example, remove ticks from:

  • decrease quote level button
  • increase quote level button
  • insert anchors button
  • subscript-button  
  • superscript-button   
  • text color-button   
  • background color-button
  • insert-table button
  • definition list button

 

Don't forget to save the changes. What we get in Kupu toolbar - is a descended customized toolbar without those buttons we've excluded:

toolbar-kupu-1

 

In case you need just several buttons you work with, let them be: bold-button, italic-button, html and zoom buttons, there is no need for you to have a big toolbar with all the buttons. Then you have to remove all the ticks from the list (button visibility) except the ones needed. And a new toolbar is exactly what you need:

toolbar-kupu-2

Note:

  • there are some buttons that go together like Bold/Italic group, Subscript/Superscript group, that's why you have to select the group and each button separately. Otherwise buttons will not be visible on the tool bar. 
  • 'Styles pulldown' box has always be ticked, otherwise a Kupu error will emerge.

Kupu Insert Image Properties

A description of the options available for inserting images with Kupu.

The Kupu editor allows you to insert image files stored in Plone into your document, using the image button on the Kupu toolbar:

toolbar-image

Clicking this button launches the Insert Image dialog:

insert-image-settings
The three columns of the dialog display:

  • In the first column - a folder navigation list.
  • In the second column - an object navigation list, from which you can select your image file.
  • In the third column - image preview, and options for alignment, size and captions.

In the example above, an image of a rose was selected - rose.png (rather large one, at its original size of 600*450 pixels).

According to the "Image alignment" option you choose, the image will be placed in your page (and the following HTML code will be generated):

  • lefthand (<img class="image-left captioned" src="rose.png" alt="rose" />);
  • righthand (<img class="image-right captioned" src="rose.png" alt="rose" />);
  • inline (<img class="image-inline captioned" src="rose.png" alt="rose" />).

You may also choose the size of the image you need. This is especially convenient when you deal with large images, as there is no need to use Photoshop or other external image editing application to crop or change the size of an image. The "Image size" dropdown list provides a choice between many sizes and formats:

image-size 
  • Large (<img src="rose.png/image_large" alt="rose" />);
  • Preview (<img src="rose.png/image_preview" alt="rose" />);
  • Mini (<img src="rose.png/image_mini" alt="rose" />) - the minimum-size image is formed;
  • Thumb (<img src="rose.png/image_thumb" alt="rose" />) - a thumb(inch)-size icon is made out of your image (little bigger than 2,5cm); 
  • Tile (<img src="rose.png/image_tile" alt="rose" />) - a tile is made out of your image; 
  • Icon (<img src="rose.png/image_icon" alt="rose" />) - an icon is made out of your image; 
  • Listing (<img src="rose.png/image_listing" alt="rose" />) - a listing icon is made out of your image;

 

The following pictures display all the formats and sizes that can be inserted using a single image file in Kupu. Note that this image is 600*450 pixels, so the largest version (original) can not be larger than this aspect ratio:

rose   listing (16,16) rose

 icon (32,32) rose

 

 tile (64,64) rose

 

 

thumb (128,128)

 

rose

 

 

 

 


mini (200,200)

rose

 

 

 

 

 

 

 

 

 

 

preview (400,400)

rose 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 large

rose

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

original (600,450)

 

 

Image Captioning

It is possible to put image caption under the image in Kupu 1.4.x version. Caption is taken from image description. Alt text is taken from image title. Alt text and caption update if image is updated.

To enable image captioning go to Site Setup -> Visual Editor. Make sure that you have Link using UIDs and Allow captioned images selected in Kupu Configuration.

kupu-configuration

 

When you add image to the site, you can put some text into its description that will be displayed as an image caption.

rose-desc

 

Now when we create a page, and insert image into it, check the box Caption:

add-image

 

Save this page, and you will see the image followed by its description as the caption all inserted into a frame:

example

How to Create FAQ with Kupu Anchors

FAQ page creation with Kupu

FAQ is an abbreviation for "Frequently Asked Question(s)". The term refers to listed questions and answers, all supposed to be frequently asked in some context, and pertaining to a particular topic.

With the help of Kupu, you can easily create a pretty-looking FAQ for your Plone site.

The 'Insert anchor' icon allows you to create links that point to other sections within the same page.

toolbar-anchor

 Follow these steps to create your FAQ page: 

  • Suppose you want a page with such a look: an index of 9 FAQ titles at the top of the page, and the corresponding entry for each FAQ below (example FAQ).
  • Format the titles for each entry as a 'subheading'.
  • Move your cursor to the beginning of the first entry, click the 'Insert anchor' icon.
  • In the following window, choose the subheading that you want to link your question to. In the case of the first question - select the first line.
anchor

 

  • Click OK.
  • Perform the same steps for each of the remaining questions.
To see the way a typical FAQ page works go to talk.quintagroup.com/faq page.

 

In addition to creating simple links within the document, Kupu anchor drawer also allows to generate table of contents for the current document. Suppose we have a document with info, displayed this way: short passages with titles (subheading), and the text (normal):

contents1

 

Let's create a table of contents for this document and place it the top of the page. For this go to page edit, cursor should be placed there where table of contents will be, i.e. in this example at the very top of the page. Click on 'Insert anchor' icon on a Kupu toolbar. Select 'Table of contents' tab in the opened window:

tab-con-tab

 

 Here you can select one or two (optional 2nd style) paragraph styles, on which basis table of contents will be generated.

There is a box next to 'Numbering', that allows making table of contents as numbered list (if selected) or unordered list (if not selected). Here you can also choose Table style (normal, heading, subheading etc.).

Let's select Subheading paragraph style, none optional style, toggle all our subheadings, make our table of contents numbered list, and Discreet table style:

table-set

 
Thus, what we get is:

contents2

 

In this example anchor window includes three tabs: 'Link to anchor', 'Manage Anchors' and 'Table of contents' tabs. In case you installed 1.4 Kupu and any of these tabs is missing, go to Site Setup -> Visual Editor. In Kupu Toolbar Configuration select Toolbar tab. Among the list of Kupu buttons find anchor button, that has two tabs: manage-anchors-tab and table-of-contents-tab:

kupu-config-anchor

Mark the necessary box (boxes) checked, and save the changes.

What is ResolveUID?

An introduction to using the ResolveUID function.

ResolveUID is a very useful Plone functionality that allows to maintain interrelation between documents in case they are moved within your Plone site (their URL changes). This is especially convenient for large sites, that have a great deal of interlinked documents.

After ResolveUID is activated, new-added internal links that you create within your site will not break if objects are moved. Correct links to objects will be maintained if documents are relocated from one folder into another.

To activate ResolveUID, go to Site setup, and in the Kupu visual editor configuration panel select the Link using UIDs option.

kupu-configuration

 

Now, when you edit with Kupu, you will notice that the HTML code for inserted images looks like:

<img src="resolveuid/832c2b08888aba0faccae78a14e9c764" alt="photo">

While this range of non-discernible characters may seem daunting, but it is how ResolveUID assigns IDs to Plone sites.

How to transform ResolveUID into a Real URL

A ResolveUID value should not appear in a rendered HTML page, it should instead be transformed into the real URL of the linked object. Kupu should be configured to use a portal transform on output so that the end user never sees a ResolveUID URL.

Otherwise you can use Plone ResolveUID product.

Both ways require collaboration with a Plone developer.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by