From: Jean-Nicolas G. <jea...@st...> - 2006-05-16 14:59:45
|
Reini Urban wrote: > 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 = new Wikitext($this->_wikitext); >> $xmlcontent = new XmlContent($output->getContent() ); >> $this->_html = $xmlcontent->AsXML(); > > Did you actually look into the WysiwygEdit framework? > This is done in WysiwygEdit ->ConvertBefore() > > require_once("lib/BlockParser.php"); > $xml = TransformText($text, 2.0, > $GLOBALS['request']->getArg('pagename')); > return $xml->AsXML(); > Yes. The problem is that it convert plugins in html too. And for the moment conversion of plugins (in html form) to wikitext is not supported. And this will require a particular development for each plugin. That's why I 've chosen this code. >> 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 |