Cookbook /
EtherpadInclusion
Summary: This recipe describes a way how to include data stored in collaborative documents in Etherpad-Lite via IncludeXML into PmWiki.
Version: 2011-12-28
Prerequisites: Etherpad-Lite, PmWiki > 2.2.17 with XMLInclude, GuiEdit
Status: experimental
Maintainer:Vittorio Muth
Discussion: EtherpadInclusion-Talk
Categories: Editing, Publishing
Questions answered by this recipe
How do I include (not: import) content created in Etherpad-Lite dynamically into PmWiki?
Description
This recipe explains how to connect Etherpad-Lite and PmWiki. Etherpad-Lite is used as an additional external editor to the standard editor of PmWiki.
Installation
- Download and install etherpad-lite from http://etherpad.org or https://github.com/Pita/etherpad-lite
- In your local instance of etherpad-lite backup the file
etherpad-lite/node/utils/ExportHtml.js
- Download a modified version of http://pragm.ath.cx/twwiki/etherpad/ExportHtml.js which produces restricted, "well formed" and so readable HTML for IncludeXML).
- Move the downloaded file to
etherpad-lite/node/utils/
- Download http://pragm.ath.cx/twwiki/xml/etherpad2wiki.xsl, for recipe IncludeXML
- Upload etherpad2wiki.xsl into your wiki (e.g. group "Main")
- In config.php add a button for recipe GuiEdit which creates the MarkUp for simple inclusion of an Etherpad-Lite document
$GUIButtons ['ethxmlincl'] = array($ArrayCount++, "(:includexml xml='", "' xsl='http://MyWiki/Main.etherpad2wiki.xsl':)", '$[[http://MyEtherpad:9001/r/ro.XYZ]', | '$GUIButtonDirUrlFmt/ethxml.gif"$[Include Etherpad Document]]"');
- Download this icon to
PmWiki/pub/MyGuiEdit/ethxml.gif
- In the wiki pages Site.EditForm or Site.PageActions create a link to etherpad-lite:
%newwin%[[http://MyEtherpad:9001/p/{*$FullName}| Etherpad:{*$FullName}]]
Usage in PmWiki
- Create a new wiki page (e.g. "MyWikiGroup.MyNewPage").
- In PmWiki's standard editor click on the (new) link "Etherpad:MyWikiGroup.MyNewPage".
- Etherpad starts in a new window and opens a wikipad named "MyWikiGroup.MyNewPage"
- In etherpad, create your content.
- In etherpad's upper right menu icon "eye" get the URL for the read only version of "MyWikiGroup.MyNewPage". Its name is for example
http://MyEtherpad:9001/r/ro.XdrZciLp
- In PmWiki's standard editor, click on the new icon . This creates prepared MarkUp:
(:includexml xml='http://MyEtherpad:9001/r/ro.XYZ' xsl='http://MyWiki/pmwiki/Main/uploads/etherpad2wiki.xsl':)
- Exchange "XYZ" with "XdrZciLp" - the read only version of "MyWikiGroup.MyNewPage".
Notes
- For Linux Ubuntu:OK
- For Windows: ?
See Also
- http://pmwiki.org/wiki/Cookbook/IncludeXML
- http://www.pmwiki.org/wiki/Cookbook/GuiEdit
- http://etherpad.org
Contributors
Comments
See discussion at EtherpadInclusion-Talk
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.