|
HTMLAreaWiki<< | Cookbook-V1 | >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
HTMLAreaWikiGoalTo integrate a WYSIWYG editor into PmWiki/PmWiki SolutionI have used htmlArea, a free script to provide the functionality. This uses Version 3 (beta) for IE 5.5+ (Windows)/Mozilla 1.3 (all OS) cross platform functionality. Comment from Daniel UnterbergerAs this Cookbook is quite outdated V1, i have a similar solution, which is implemented differently at Cookbook.ConvertHTML and working with PmWiki 2.x . No Changes in httpd.conf needed, also working quite good with IE5+ and Moz. It Adds another Field for HTML and keeps old Wiki-Field so it doesnt change your old pages. Search has to be optimized. ... FilesAttach:HTMLArea.zip Δ (This wont upload for me, it is too big! (119 kb) Get it from the site mentioned below). Limitations
Features
InstallationThis took some doing :o) Pre-requisites & Assumptions
Download the attached zip file unzip it to a folder called htmlArea from the Wiki root e.g. /Wiki/htmlArea Copy all the folders in /htmlArea to the root.
Add an alias in your Apache httpd.conf file Alias /htmlArea "C:/_Wiki/htmlArea" Next step;copy the following lines into your local.php: ## $InlineReplacements - Needed as I have removed a line in PmWiki.php that stops 'manual line breaks' working.
$InlineReplacements['/\\[\\[<<\\]\\]/'] = "<br clear='all' />";
$HTMLHeaderFmt.="<style type=\"text/css\">@import url(/htmlarea/htmlarea.css)</style>";
$PageEditFmt.="<script type=\"text/javascript\" src=\"/htmlarea/htmlarea.js\"></script>
<script type=\"text/javascript\" src=\"/htmlarea/dialog.js\"></script>
<script type=\"text/javascript\" src=\"/htmlarea/lang/en.js\"></script>
<script type=\"text/javascript\" defer=\"1\">
HTMLArea.replaceAll();
</script>";
## Change the URL format so the insert image/link buttons work.
## May be better to disable the buttons instead.
$UrlImgFmt = "\$Url";
$UrlLinkFmt = "\$Url";
## Turn off the EnablePathInfo Function so the editor finds the proper folders.
## To be perfectly honest, I don't know why this is required...
$EnablePathInfo=0;
Find the function in pmWiki.php PrintText and comment out the following line: (line number 700 in pmwiki-0.5.26)
Edit htmlArea/htmlarea.js, changing lines 53 & 54 to:
this.imgURL = "/wiki/images/";
this.popupURL = "/wiki/popups/";
Copy reference.html from the htmlArea folder to the wiki root folder, so the help button works. It may be better to replace it with a better help file... UsageIt's WYSIWYG... :0) See Also
HistoryFirst attempt Discussion forumA place for anyone to discuss this functionality. Comments, BugsSooo many, I added a limitations section near the top. Contributors
Copyright© copyright Dave Jackson 2004 pmwiki-2.2.36 -- Last modified by {{DanielUnterberger}}
|