Hi,
I've come across some odd behaviour when using the Wysiwyg editor on Pharo
when using the Swazoo Adaptor. There are some very strange effects with ajax
calls and the Swazoo adaptor which I've yet to characterise.
So if you try the Wysiwyg editor with Pharo be sure to use the Comanche
Adapter rather than the Swazoo Adapter.
Ideally we'd use the Zinc adapter, though I haven't tested with it and I
guess we should change the ConfigurationOfSeaside30 to load the Zinc adapter
on Pharo 1.3....
There are also various fixes which have been added:
- fix to file-uploading paths on Windows (thanks to Bart Veenstra)
- improved error reporting for file-upload errors
- moved the registration code (for the filter and configuration instance) to
class side of PRFileUploadWysiwygEditorBase. see
#initializeWysiwygEditorFileUpload*
Nick
On 24 August 2011 16:24, Nick Ager <nick.ager(a)gmail.com> wrote:
Hi,
I've been working on the ConfigurationOfxxx to load the Wysiwyg editor and
think I've finally made it.
Starting with a clean Pharo1.3 image, I found I first needed to load a
recent version of Seaside:
Gofer new
squeaksource: 'Seaside30';
package: 'ConfigurationOfSeaside30';
load.
ConfigurationOfSeaside30 loadLatestVersion.
I've added the editor configuration to ConfigurationOfPierAddOns2, so the
next step is to load the configuration:
Gofer new
renggli: 'pier2addons';
package: 'ConfigurationOfPierAddOns2';
load.
If you want to test the editor in a minimal configuration, then execute:
((Smalltalk at: #ConfigurationOfPierAddOns2) project version: '2.0.9')
load: #('Pier-FileUpload-Wysiwyg').
Or if you want the editor loaded into a more complete "standard" pier
installation execute:
((Smalltalk at: #ConfigurationOfPierAddOns2) project version: '2.0.9')
load: #('Pier-Setup' 'Pier-FileUpload-Wysiwyg').
The Wysiwyg editor insert image/file upload, functionality requires a
filter and configuration to be installed. The magic to do this is
in ConfigurationOfPierAddOns2>>#initializeWysiwygEditorFileUpload:
ConfigurationOfPierAddOns2>>#initializeWysiwygEditorFileUpload
| pierApp |
pierApp := WADispatcher default handlers at: 'pier' ifAbsent: [
| distribution |
distribution := Smalltalk at: #PRDistribution ifAbsent: [ nil ].
distribution isNil
ifTrue: [
(PRPierFrame registerAsApplication: 'pier' kernel: (PRKernel named:
'defaultKernel')) ]
ifFalse: [
PRPierFrame registerAsApplication: 'pier' kernel: PRDistribution new kernel
] ].
pierApp filters detect: [ :aFilter | aFilter class name =
#NAFileUploadRequestHandler ] ifNone: [ pierApp addFilterFirst:
NAFileUploadRequestHandler new ].
pierApp configuration addParent: NAFileUploadConfigurator instance
The installation will install the required filter and configuration
provided your Pier application is installed at '/pier'
Editing a page should now display the Wysiwyg editor. The editor's links
dialog should include a Pier site map, allowing you to easily select a link
within the site. The insert image, should include a "choose file" button
which will upload a file and by default store it in folder based on the
location of the page within the pier site-map, by default within a folder -
'uploadedFiles' - in the image folder. The uploaded images folder can be
configured within /config in the "File Upload" section.
Hope this all makes sense
Nick