Hi,
I'm trying to do in-place editing on Pier pages (or rather I want to use pier wiki markup in user comments in my app). Has anyone done something like that before? I am using the seaside 3.0 one-click image. I can do in-place editing with 'normal' text, the problem with pier seems to be that the text that you want to edit (pier's wiki source) is different from what you have on the displayed page (the HTML rendering of the wiki text). The Scriptaculous documentation mentions this: http://wiki.github.com/madrobby/scriptaculous/ajax-inplaceeditor How to edit server side formatted text (formatted with eg. textile) Format the text on the server when the initial page is rendered. Add a new server side action that returns the unformatted text in the reponse and specify the load Text URL? option as a URL to this action. The control will load the text from the server instead of using the text on the page. The action that receives the updated text should save it and return the formatted text as an HTML snippet in the reponse. The relevant option in Scriptaculous Ajax.InPlaceEditor is loadTextURL V1.5 null Will cause the text to be loaded from the server (useful if your text is actually textile and formatted on the server) Now I see nothing related to this in SUInPlaceEditor. Do you have any hints how this combination of in-place editing and wiki markup could be done? Thanks in advance Matthias _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
If I understood you correctly you want something along Stackoverflow,
where you see the resulting HTML along when you type. I think the in-place editor does not help much in this case. What you want to do is a normal text area that triggers an AJAX action that serializes the textarea and that updates a preview with the freshly rendered HTML. Lukas On 9 February 2010 01:47, Matthias Berth <[hidden email]> wrote: > Hi, > > I'm trying to do in-place editing on Pier pages (or rather I want to > use pier wiki markup in user comments in my app). Has anyone done > something like that before? I am using the seaside 3.0 one-click > image. > > I can do in-place editing with 'normal' text, the problem with pier > seems to be that the text that you want to edit (pier's wiki source) > is different from what you have on the displayed page (the HTML > rendering of the wiki text). > > The Scriptaculous documentation mentions this: > > http://wiki.github.com/madrobby/scriptaculous/ajax-inplaceeditor > How to edit server side formatted text (formatted with eg. textile) > > Format the text on the server when the initial page is rendered. Add a > new server side action that returns the unformatted text in the > reponse and specify the load Text URL? option as a URL to this action. > The control will load the text from the server instead of using the > text on the page. The action that receives the updated text should > save it and return the formatted text as an HTML snippet in the > reponse. > > The relevant option in Scriptaculous Ajax.InPlaceEditor is > > loadTextURL V1.5 null Will cause the text to be loaded from > the server (useful if your text is actually textile and formatted on > the server) > > Now I see nothing related to this in SUInPlaceEditor. > > > Do you have any hints how this combination of in-place editing and > wiki markup could be done? > > Thanks in advance > > Matthias > _______________________________________________ > Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On Tue, Feb 9, 2010 at 8:54 AM, Lukas Renggli <[hidden email]> wrote:
> If I understood you correctly you want something along Stackoverflow, > where you see the resulting HTML along when you type. No, I want the simpler thing: I click on some text and get a text area where I can edit the wiki source. No live preview necessary. Thanks Matthias > I think the in-place editor does not help much in this case. What you > want to do is a normal text area that triggers an AJAX action that > serializes the textarea and that updates a preview with the freshly > rendered HTML. > > Lukas > > On 9 February 2010 01:47, Matthias Berth <[hidden email]> wrote: >> Hi, >> >> I'm trying to do in-place editing on Pier pages (or rather I want to >> use pier wiki markup in user comments in my app). Has anyone done >> something like that before? I am using the seaside 3.0 one-click >> image. >> >> I can do in-place editing with 'normal' text, the problem with pier >> seems to be that the text that you want to edit (pier's wiki source) >> is different from what you have on the displayed page (the HTML >> rendering of the wiki text). >> >> The Scriptaculous documentation mentions this: >> >> http://wiki.github.com/madrobby/scriptaculous/ajax-inplaceeditor >> How to edit server side formatted text (formatted with eg. textile) >> >> Format the text on the server when the initial page is rendered. Add a >> new server side action that returns the unformatted text in the >> reponse and specify the load Text URL? option as a URL to this action. >> The control will load the text from the server instead of using the >> text on the page. The action that receives the updated text should >> save it and return the formatted text as an HTML snippet in the >> reponse. >> >> The relevant option in Scriptaculous Ajax.InPlaceEditor is >> >> loadTextURL V1.5 null Will cause the text to be loaded from >> the server (useful if your text is actually textile and formatted on >> the server) >> >> Now I see nothing related to this in SUInPlaceEditor. >> >> >> Do you have any hints how this combination of in-place editing and >> wiki markup could be done? >> >> Thanks in advance >> >> Matthias >> _______________________________________________ >> Magritte, Pier and Related Tools ... >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki >> > > > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ > Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
>> If I understood you correctly you want something along Stackoverflow,
>> where you see the resulting HTML along when you type. > > No, I want the simpler thing: I click on some text and get a text > area where I can edit the wiki source. No live preview necessary. That's far more complicated. Have a look at PRHaloRenderer in Pier-EditorEnh this is somehow similar. This adds a halo around each structure as it is rendered to HTML. In your case you would do something similar but render an in-place editor around each paragraph. Some versions of Pier back in 2005 or 2006 had such a functionality. You might get some ideas looking at that code, although I don't remember if it every worked. Directly editing the document AST becomes quite tricky if you go beyond simple paragraphs. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
What do you think of CKEditor ?
Do you think we could integrate it (it's open source and integrable with JQuery - but I think there's a license for commercial apps)? 2010/2/9 Lukas Renggli <[hidden email]>
-- Cédrick _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
> What do you think of CKEditor ?
CKEditor is a HTML editor. Unless you write a HTML parser you will loose the ability to render to different output formats, to keep references between pages and automatically rewrite them as things move around, etc. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In reply to this post by Lukas Renggli
Ah, OK. I still want something simpler: just edit the whole document
in-place. Anyway, the basic problem (from my point of view) remains: the text you want to edit is different from the text that is already in the html. Using Scriptaculous Ajax.InPlaceEditor's loadTextURL would allow pier to put the wiki-source text into the textarea when the in-place editor starts. I'll keep looking around the source then, maybe I find something similar in the Scriptaculous seaside package :) Matthias On Tue, Feb 9, 2010 at 9:44 AM, Lukas Renggli <[hidden email]> wrote: >>> If I understood you correctly you want something along Stackoverflow, >>> where you see the resulting HTML along when you type. >> >> No, I want the simpler thing: I click on some text and get a text >> area where I can edit the wiki source. No live preview necessary. > > That's far more complicated. > > Have a look at PRHaloRenderer in Pier-EditorEnh this is somehow > similar. This adds a halo around each structure as it is rendered to > HTML. In your case you would do something similar but render an > in-place editor around each paragraph. > > Some versions of Pier back in 2005 or 2006 had such a functionality. > You might get some ideas looking at that code, although I don't > remember if it every worked. Directly editing the document AST becomes > quite tricky if you go beyond simple paragraphs. > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ > Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |