How to Add Styles to the Kupu Editor
Define and name the class
For this exercise we will create a class named "Alert". It will be large red letters in a black bordered box with a pale gray background.
Add the class definition to the style sheet
- Login to the library Web site as admin
- Click on site setup
- Click on Zope Management Interface
- Click on portal_skins (Controls skin behaviour (search order etc))
- Click on Custom
- Click on ploneCustom.css
- Scroll about a third of the way down the template and place the cursor just above /* </dtml-with> */
- Type, or copy and paste, your code (below is an example of creating an alert)
p.alert { border: 2px solid #000000; background-color: #e0e0e0; font-family: Arial, sans-serif; font-size: large; color: red; text-align: center; } - Click on the Save Changes button
Invalidate the Cache
- Click on the first / in the path at the top of the page
- Click on CacheSetup_ResourceRegistryCache (Cache for saved ResourceRegistry files)
- Click on the Statistics tab
- Click on /anytown/portal_css (anytown will be your actual city name as it appears in the domain name)
-
Note: If this is the first time you've changed this style sheet, there may not be a cached page. If this is the case, you will not see the /anytown/portal_css for your town. You may also see /portal_css for other PLOW Web sites. Skip ahead to step 6 in this section to complete this exercise
- Click the Invalidate button
- Click on the first / in the path at the top of the page
- Click on the View tab
Add the Style to the Kupu Editor
- Click on site setup
- Click on Kupu Visual Editor
- Verify that the Config tab is open
- Scroll down to Paragraph Styles
- Put the cursor at the end of the last item in the list (usually 'callout')
- Press enter
- Type:
Alert|p|alert
- Click on the Save button
Apply the Style to Text on a Page
- Click on the Use Our Library tab
- Click Edit
- In the body text scroll down to the bottom of the text
- Type this text:
The library closes at 7:00 pm Mon - Thurs, May 28 - Sept 3
- Select the text
- Select Alert from the Styles menu in the Kupu editor toolbar
- Click the save button
- If the change is not immediately visible do a hard page refresh. Ctrl + Refresh button for Firefox and Shift + Refresh button for Internet Explorer.