From: Jean-Nicolas G. <jea...@st...> - 2006-05-12 11:56:28
|
Hi, 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(); -------- 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 ? Thanks. Regards. Jean-Nicolas. |
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/ |
From: Reini U. <ru...@x-...> - 2006-05-13 20:06:04
|
2006/5/13, Reini Urban <ru...@x-...>: > 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. Jean-Nicolas, Your patch is now in CVS. Thanks a lot! I simplified it a bit to fit into the existing WysiwygEdit framework and to take advantage of translatable strings, VIRTUAL_PATH urls, and seperate starter scripts. I also added WYSIWYG_BACKEND =3D Wikiwyg and made this the default. This is the one which actually works, because the required and hairy html->wiki conversion is done in the JS itself - as it should be. There are still minor quirks, but please post patches to this CVS version: 1.3.13pre-20060513 --=20 Reini Urban http://phpwiki.org/ http://spacemovie.mur.at/ http://helsinki.at/ |
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 |
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/ |
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. |
From: Jean-Nicolas G. <jea...@st...> - 2006-05-15 08:04:47
|
Great. I am very pleased. Thanks for the conversion to include it in the wysiwygEdit framework. I am now working on the new release that will contain lots of more features. I am planning to post it at the end of the week. Jean-Nicolas. Reini Urban wrote: > 2006/5/13, Reini Urban <ru...@x-...>: >> 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. > > Jean-Nicolas, > Your patch is now in CVS. Thanks a lot! > > I simplified it a bit to fit into the existing WysiwygEdit framework > and to > take advantage of translatable strings, VIRTUAL_PATH urls, and > seperate starter scripts. > > I also added WYSIWYG_BACKEND = Wikiwyg and made this the default. > This is the one which actually works, because the required and hairy > html->wiki conversion is done in the JS itself - as it should be. > > There are still minor quirks, but please post patches to this CVS > version: > 1.3.13pre-20060513 |
From: Reini U. <ru...@x-...> - 2006-05-15 15:27:06
|
2006/5/15, Jean-Nicolas GEREONE <jea...@st...>: > Great. I am very pleased. > Thanks for the conversion to include it in the wysiwygEdit framework. > I am now working on the new release that will contain lots of more featur= es. > I am planning to post it at the end of the week. good. lost of buttons need to be added. (preview, save, formatting, ...) maybe we should use our previous toolbar buttons, not the ones from Wysiwyg and the previous popup buttons (allpages, allplugins, categories...) should really use AJAX, either via xmlrpc or POST. --=20 Reini |