Question
Hi,
I have installed TWiki and found it immensely useful.
One of the feedbacks that we received from the users was that they could very well do with copy pasting from word/directly entering html. So on the edit text area of TWiki, I installed html area
http://www.interactivetools.com/products/htmlarea/
, a free WYSIWYG type editor .
This works very well for new pages as they are saved only as HTML. But for the older pages, once the pages are converted to HTML, they lose all the CR/LF characters as well as space characters, due to which TWiki doesn't make those to bullets or tables etc.
What I wish is only some way to retain the CR/LF and space characters, so that TWiki can process further in the right way. Since my Perl knowledge is a joke, I thought about getting some inputs from the pros first..
Any suggestions would be welcome.
Thanks a lot.
Environment
--
ManishKaduskar - 07 Jul 2004
Answer
If you haven't already, check out
HtmlAreaEditor. Also see related topics listed on that page. I don't believe folks have worked out details for integrating this potentially valuable tool.
--
LynnwoodBrown - 07 Jul 2004
Thank you Lynnwood, I had put a search all over the web, but not on TWiki ! Anyway, the code I found there was more than a year old and htmlarea is much more simpler now.
I have come up with another idea to make
HtmlAreaEditor implementable on TWiki.
What happens now is this:
Edit.pm renders raw text and puts it in the %TEXT%.
If we use view.pm, then HTML is generated from the TWiki text and the page is displayed.
what is proposed is this:
In edit.pm, process the TWiki tags, convert them to HTML and give this HTML input to the HTMLArea. Although this would make ALL the TWiki tags useless, but it would convert them to HTML if they are pre-existing. And HTMLArea is adept at processing it.
I am not able to exactly make the changes to the edit.pm to change the text from TWiki-text to HTML.
I think the answer lies somewhere in the following piece of code, but I am not able to pinpoint it:
$text = &TWiki::handleCommonTags( $text, $topic ); #from view.pm
writeDebugTimes( "view - handleCommonTags done" );
$text = &TWiki::getRenderedVersion( $text );
writeDebugTimes( "view - getRendereredVersion done" );
OR
( $meta, $text ) = &TWiki::Store::readTopic( $webName, $topic ); # in edit.pm
Could someone please help me out on this one ? If that is done, I believe that most of the problems discussed in
HtmlAreaEditor would also be solved automatically. If I am able to do it, I will put the code up on TWiki
Thanks,
--
ManishKaduskar - 20 Jul 2004
I added a note in
HtmlAreaEditor about your proposal above in hopes that someone interested in that topic and having more coding competence than me will pick up on your help request. I hope so as I believe this could be a great enhancement of TWiki!
--
LynnwoodBrown - 20 Jul 2004
Ok I've cracked it !

I'll put a detailed update (with the changes etc) about it asap, once I've consolidated what all did I change. Thanks Lynnwood for all the support.
--
ManishKaduskar - 22 Jul 2004
Keywords: WEB BASED EDITOR, WORD PROCESSOR, HTMLAREA
See IntegrateHtmlAreaEditor for instructions