Page 1 of 1

RTF (or HTML) to Wiki Markup Conversion

PostPosted: Thu Sep 11, 2008 8:30 am
by eddy current
Hi there,

I require some help in creating a "buddy" tool for a wiki application. Let me explain...

Rather than my novice students entering content using the wiki markup language, I want them to post their entries using an RTF editor like Editor's Toolbook (or an HTML editor.)

By pressing a CONVERT TO WIKI button, the content will then be converted to wiki-markup language in a text box on the next page. Another button will then copy the markup text to the clipboard for pasting into the wiki.

Best case scenario is a tool that will also convert the wiki's markup language into the RTF Editor (i.e., conversion works both ways.)

Any ideas on how to best approach this? Use REGEX? Use HTML instead of RTF for WYSIWYG editing?

Glen

p.s. I know that there are websites that do this using Javascript, so it can't be too difficult (I hope!)

PostPosted: Thu Sep 11, 2008 9:31 am
by Gaev
Glen:

Not knowing anything about Wiki Markup, I Googled "convert wiki markup" ... and soon found this website ... http://goessner.net/articles/wiky/ ... html to wiki ... and wiki to html ... using javascript/regex ... can be used freely under the "Creative Commons GNU LGPL License"
Use HTML instead of RTF for WYSIWYG editing?
Definitely HTML ... RTF will be easier to compose (using Wordpad) ... whereas your students will need some kind of HTML Composer/Editor to create articles in html format first ... otherwise, html has more advantages ... more open and easier to read/scan source code ... more available solutions ... equivalents for all markups in wiki ... etc.

Surprising that Wikipedia does not have a WYSIWYG Editor that produces Wiki markup coded text files directly.

PostPosted: Thu Sep 11, 2008 9:55 am
by eddy current
Thanks Gaev,

That WikyBox -- http://goessner.net/articles/wiky/WikyBox.html -- is exactly what I'm looking for in a NeoBook application. I would just need to modify the wiki conversion options, since our wiki uses different symbols for bold, italic, headings, etc.

This is the online one that I've used in the past:
http://diberri.dyndns.org/wikipedia/html2wiki/

I was just hoping that with NeoBook's improved Javascript and Web-based features that I could manage the process within NeoBook, instead of relying on an external website.

Much appreciated,
Glen

PostPosted: Thu Sep 11, 2008 11:13 am
by Gaev
Glen:
That WikyBox -- http://goessner.net/articles/wiky/WikyBox.html -- is exactly what I'm looking for in a NeoBook application.

I was just hoping that with NeoBook's improved Javascript and Web-based features that I could manage the process within NeoBook, instead of relying on an external website.
Given that the software can be freely used ... you should be able to deploy it inisde a Browser object ... that loads WikyBox.html from the user's local disk.

And it should be possible to use NeoBook's BrowserExecScript and other commands ... to populate and extract the contents of the various TextArea Boxes in the html document ... as well as invoke the buttons on this web page.

Looks like you might even be able to use NeoBook's (multi-line) TextEntry Box ... and use the WebBrowser object to load another (simpler) html file ... example provided on his web page.
I would just need to modify the wiki conversion options, since our wiki uses different symbols for bold, italic, headings, etc.
From his website ...Wiky consists of some ordered sets of rules based on regular expressions. ... so it should be possible ... but since it is Regex ... whose syntax is not human friendly ... your best bet would be to ask the developer of Wicky to provide a the desired changes ... for a small fee.