Personal tools
You are here: Home Documentation How-tos How to Setup an External Editor
Navigation
 
Document Actions

How to Setup an External Editor

This How-to applies to: Any version.

If you're interested in using an external editor to create pages in Plone, see this how-to. Note: the information covered here is for users who are comfortable working outside the graphical interface of Plone

For example, you can edit a Microsoft Word document stored on your Plone site locally in Microsoft Word. When you save the document, it's automatically sent to Plone.

External Editor comes with the Plone installer packages and sets up automatically on the server. The application is unusual in that it has two components: one for the server and one for each client that wants to use the product.

Installing on the Server (tasks completed by your web-site consultant.)
Installing the server product isn't necessary if you used an
installer to install your Plone site. If this isn't the case, the
server-side product is available at http://plope.com/software/ExternalEditor
Install the product in the standard way discussed at the beginning of this chapter,
and then restart your Zope.

Then, in Plone, log in as the administrator, click plone setup,
and then select Portal Configuration. Select the Enable External Editor
option to make sure you can edit objects with this tool.

Installing the Client Product

For every computer accessing the Plone site, you'll need to install this product on the client computer. Just like you'd install Flash or QuickTime in your browser, you install the client-side External Editor code. This is manageable in intranets or on your computer but can be a little harder for a public site.

For Windows 2000 and XP, download the executable Windows installer named zopeedit-win32-0.7.1.exe. Double-click the installer, and the graphical install will proceed. You just need to select all the defaults. This will set up the options for Internet Explorer. To verify that this has worked, do the following:


  1. From the My Computer window, choose Tool > Folder Options
  2. In the File Types window, scroll to the bottom, where you should see the extention Zope, as showing in 10-13
externaleditorimage1.png



















 File type configuration on Windows


After you've installed the client, you'll need to configure each browser you want to use. Instructions for Konqueror, Galeon, and other browsers are available online at Zope.org. The following are the step-by-step configuration instructions for Mozilla:

  1. Select Edit > Preferences
  2. Under Navigation, choose Helper Applications
  3. Click the New Type button
  4. Enter a description, such as Zope Editor
  5. for MIME type, enter application/z-zope-edit
  6. For Application, select the helper application Python file.
  7. Click OK, and then close Preferences.

External Editor opens an editor based on the contents of a configuration file. To have an editor of your choice invoked, alter that file. You can find it under different names in the following places, depending on your setup:

  • On Windows, if you installed Plone using an installer, you can find this file at c:Program FilesPloneZopepwizopeedit.ini.
  • On Windows, if you used the stand-alone External Editor installer, you can find this file in the directory you installed External Editor to; by default this is c:Program FilesZopeExternalEditorzopeedit.ini.
  • On Unix, this file will be called .zope-external-edit and located in the home directory of the user running the program, for example, /home/andy/.zope-external-edit. It's in the home directory of the user because each user may have different settings.

This file contains a mapping of extensions and the editor invoked; to change the editor for page templates, for example, find the following lines that have meta-type:Page-Template:

[meta-type:Page Template]
extension=.pt

For example, you can use Scite, a free text editor. To use this editor for page templates, you'd have to change the file to read as follows:

[meta-type:Page Template]
extension=.pt
editor=scite

For External Editor to work, each invocation of the editor must open a separate process. This means that the External Editor client program can monitor that process to see when it's finished. This causes problems for some editors that try to open multiple files in the same process. For example, to load VIM in KDE, you must run a separate shell as follows:

editor=konsole -e vim

Microsoft Word

Editing a Microsoft Word document is actually really easy to set up; all you need is Microsoft Word installed on your local computer. Upload your Microsoft Word document to Plone as a standard file and then view the file in Plone. Click the little pencil icon in the top-right corner of your page. Microsoft Word will open on your computer, and the document from the server will display. You can now edit the content as much as you want, and clicking Save will automatically save the file into Plone.

Editing Page Templates Through External Editor
To create a page template, use the ZMI. Sure enough, when viewing
the folder containing the page template, you'll see an extra pencil
icon to the right of the object. Clicking the pencil will activate
External Editor and open the page template in the editor you've
selected. All you need to do is find a good editor for editing the page
templates. Since page templates are just Extensible HTML (XHTML), I use
a simple editor that supports Extensible Markup Language (XML). The
following sections discuss two example editors: Dreamweaver and
HTML-Kit.

Dreamweaver MX

Change the [meta-type:Page Template] part of the configuration file to point to Dreamweaver. For example, in my installation this is as follows:

[meta-type:Page Template]
extension=.pt
editor=C:\Program Files\Macromedia\Dreamweaver MX\Dreamweaver.exe

Clicking the pencil icon to edit in External Editor now opens it directly in Dreamweaver, as shown in Figure 10-14. Unfortunately, Dreamweaver will not open in each file in a separate instance, which means you can edit only one file at a time.

externaleditorimage2.png

Figure 10-14. Editing page templates in Dreamweaver

Adapted from  Andy McKay: The Definitive Guide to Plone. Apress 2004

Non-commercial
 
    This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
 
Commercial
 
    Apress and Andy McKay hold the rights to any commercial work. How this will affect current and future versions is undecided. If this is a problem or issue, please contact andy@enfoldsystems.com. If you are unsure about contributing to this project, then I'll be happy to chat to you about it. 
by samk last modified 2007-03-21 08:43
Contributors: Sam Knox, Aaron Vanderlip
All content on this site is licensed under a Creative Commons License.
Still Stumped?
If you've still got questions about Plone, here are your best bets for finding out more:
 

All content in this site distributed under the Creative Commons "Attribution-NonCommercial-ShareAlike" license unless otherwise noted.

Powered by Plone CMS, the Open Source Content Management System