Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux
Web server: Apache
Perl version: 5
Client OS: Win
Web Browser: IE 5.5+

-- 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 smile

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 ! smile 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

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatEXT edit r1 manage 9.0 K 2004-07-24 - 09:18 ManishKaduskar Modified EDIT Perl file for HTMLArea
Texttxt edit.tiger.tmpl.txt r1 manage 5.2 K 2004-07-24 - 09:17 ManishKaduskar Sample HTMLArea implemented TMPL
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2004-07-26 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.