From: Reini U. <ru...@x-...> - 2006-05-17 05:46:26
|
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 =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"); > > $xml =3D 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. > 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. --=20 Reini Urban http://phpwiki.org/ http://spacemovie.mur.at/ http://helsinki.at/ |