From: Reini U. <ru...@x-...> - 2006-05-13 18:51:31
|
2006/5/12, Jean-Nicolas GEREONE <jea...@st...>: > For the development of the wysiwyg editor, I have an issue for the > conversion from wikitext to html of links. > > To convert wikitext to html, I use the code bellow : > > require_once("lib/BlockParser.php"); > $output =3D new Wikitext($this->_wikitext); > $xmlcontent =3D new XmlContent($output->getContent() ); > $this->_html =3D $xmlcontent->AsXML(); Did you actually look into the WysiwygEdit framework? This is done in WysiwygEdit ->ConvertBefore() require_once("lib/BlockParser.php"); =09$xml =3D TransformText($text, 2.0, $GLOBALS['request']->getArg('page= name')); return $xml->AsXML(); > If my "$this->_wikitext" contains links like : > > [ text | wikilink ] , [ text | newpage ] .. that's ok. > > But if I have something like : > > [ text | http://... ] or [ text | ftp://... ] ... > > it just convert it in "<p ... >text</p>" and the link disappear. > > > Does someone know something about it ? or is there a way to force > phpwiki to keep the link or convert it correctly ? I'm currently converting your .js patches to the hooks provided by the WysiwygEdit framework, so one can easily switch from any supported WysiwygEdit class to another. Wikiwyg FCKEditor htmlarea2 htmlarea3 spaw tinymce --=20 Reini Urban http://phpwiki.org/ http://spacemovie.mur.at/ http://helsinki.at/ |