From: Jean-Nicolas G. <jea...@st...> - 2006-05-17 07:15:05
|
Reini Urban wrote: > 2006/5/16, Jean-Nicolas GEREONE <jea...@st...>: >> 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. > > Ah, I see! Okay, we can temp. disable the plugin type for this kind of > conversion. > For the moment maybe with a global, later the API has to be enhanced. > Finally I have changed my view. I will use : require_once("lib/BlockParser.php"); $xml = TransformText($text, 2.0, $GLOBALS['request']->getArg('pagename')); return $xml->AsXML(); And to avoid converting plugins I will send : ~<?plugin ... and not <?plugin ... for the moment. So links will be ok 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. |