Personal tools
You are here: Home Documents How-to External Editorの設定

External Editorの設定

Document Actions
Zope / Plone では、ブラウザからの編集だけではなく、あなたが普段使っているエディタ・ペイントツール・Office ソフトを利用してコンテンツを編集することもできます。 この機能は、Plone をインストールすれば標準でサーバ側には入ります

機能の概要

External Editor (外部エディタ)は、その名の通り、ブラウザの外で、コンテンツの編集をする仕組みです。複雑な構造のHTML を記述したり、python script を書くときには絶大なる効果を発揮します

入手先

最近のZope/Plone であれば、インストール時点でサーバ側にはインストールされています。

クライアント側にはインストールを別途行う必要があるので、

Mac(OS/X, ZopeEditManager)

http://www.macupdate.com/info.php/id/13986

より、最新版を入手してください

  • ExternalEditor-x.y.z.src.tgz

これはZope Product なので、クライアント側には不要です

  • zopeedit-x.y.z-src.tgz

Unix/Linux はこれをダウンロード、そしてWindowsは

  • zopeedit-win32-x.y.z.exe
  • zope-external-editor-x.y.z.msi

のどちらかをダウンロードしてください。どちらでも結果に違いはありません。好みの問題です。

Mac の方は、上のページにいけば「Download Now」というリンクがありますのですぐにわかると思います

インストール

Windows

最近では、Windows Installer 版(.msi)も配布されていますので、お手軽度でいえば、それが最強です。

i0.gif/image_preview

お約束通り、Next や Accept 、OK などを押していけば、(一般的にはCドライブの) \Program Files\Zope External Editor\ にインストールされます。

Unix/Linux等

tgz を解凍してから

python setup.py install

で、OKです。適切な権限が必要です。

設定

Windows + IE ですと、ブラウザ側の設定は終っています

i1.gif

一度IEで起動したあとであれば、Firefox でも普通に動くのですが、何も設定せず、エンピツアイコンを押すとエラーダイアログが出ることがあります。 そうするとデフォルトのZopeEdit.ini が自動的に作られます。

ZopeEdit.iniの場所は、Windows では(一般的にはCドライブの) \Documents and Settings\ユーザID\ の下になります。

\Program Files\Zope External Editor\ZopeEdit.ini をいじっても変化はありません.気をつけてください

Note

Windows Vista /7 では、ZopeEdit.iniの場所が (一般的にはCドライブの)\ユーザ\ユーザID\の直下になります。

Unix/Linux 等では、~/.zope-external-edit となります。

その設定ファイルの

# Uncomment and specify an editor value to override the editor
# specified in the environment
# editor = 

という場所を

# Uncomment and specify an editor value to override the editor
# specified in the environment
editor = notepad

とすると、外部エディタのデフォルト値が notepad になります

# しかし、notepad は utf-8 には対応しているものの、改行にCR+LFを想定しているため、お勧めできません。

Unix/Linux 系なら、emacsclient も便利です

あとは、各コンテンツタイプに対してEditor を指定することもできます。 これは、デフォルトで入っていますが、画像の編集にgimp を使用する例です。

[content-type:image/*]
editor=gimp

[content-type:image/gif]
extension=.gif

[content-type:image/jpeg]
extension=.jpg

[content-type:image/png]
extension=.png

でも、実際にはWindows環境では gimp がpath の通っているところにあるかどうかわかりませんので、フルパスで書くことが必要です。

逆に、もしPhotoshop をお持ちなら、

[content-type:image/*]
editor=C:\Program Files\Adobe\Photoshop CS\photoshop.exe

のようにして、画像編集ソフトウェアを切りかえることもできます。

な、はずだったんですが、Photoshop CSは、External Editor としては動かないようです。 別のソフトウェアをご利用ください(Photoshop6 は動くそうです)。

i2.gif

それから、オフィス関係ですが、「ファイル」でアップロードして、外部エディタを指定して編集することもできます。

Powerpointの場合は

[content-type:application/mspowerpoint]
extension=.ppt
editor="C:\Program Files\Microsoft Office\OFFICE11\powerpnt.exe"

[content-type:application/vnd.ms-powerpoint]
extension=.ppt
editor="C:\Program Files\Microsoft Office\OFFICE11\powerpnt.exe"

のようになります。

OpenOffice.org を利用する場合には

[content-type:application/mspowerpoint]
extension=.ppt
editor="C:\Program Files\OpenOffice.org 2.0\program\soffice.exe" 

[content-type:application/vnd.ms-powerpoint]
extension=.ppt
editor="C:\Program Files\OpenOffice.org 2.0\program\soffice.exe" 

とすればうまくいきます

i3.gif/image_preview
The following items are included in this how-to:
Image i0.gif
The following items are included in this how-to:
Image i1.gif
The following items are included in this how-to:
Image i2.gif
The following items are included in this how-to:
Image i3.gif

This How-to applies to: Any version.

by masaya jack kato last modified 2010-04-16 12:46

Powered by Plone, the Open Source Content Management System