Hi Lukas,
This is really cool and works amazingly well!
Thanks.
> For the integration you could add a
Magritte extension method to
> PRCase to change the Magritte component used to edit documents:
> descriptionDocumentWysiwig: aDescription
> ^ aDescription componentClass: MyWysiwigComponent
Done - now when you install the 'Pier-Wysiwyg' package the default editor
changes to be the Wysiwyg editor - I knew there would be an easy solution.
There's a problem rendering internal links, which I guess is because I'm
parsing the wiki text removed from the site's structure. I'm not sure the
best way to fix this. Do I attach the editing structure temporarily to the
main site? Then remove it when I've finished editing? Here is my method for
rendering a preview of the text being edited:
renderPreviewOn: html
| parsedStructure renderer |
html div
id: self previewId;
with: [
parsedStructure := PRDocumentParser parseStream: self wikiText readStream.
renderer := PRViewRenderer new.
renderer withinContentDo: [ renderer start: parsedStructure in: self on:
html ] ]
Any thoughts?
Thanks
Nick