Re: [campsite-dev] Please help me with a small function
  • Thanks a lot Nenad,
    I was actually very very close to solve it last night using a modified
    version of the placeTags() procedure located in htmlGenerator.java. I ended
    up returning the correct string but it was wrong in certain cases. Your
    solution however even though i havent tested it yet seems much better since
    it only works with the selected text. The solution i was aiming for was
    simply to "translate" the whole document and calculate the new
    selectionStart and selectionEnd.
    I will let you know as soon as i test it how it works!.

    And of course if you ever come to Chile ill invite you a couple
    drinks Razz

    Regards!

    ----- Original Message -----
    From: "Nenad Pandzic"
    To:
    Sent: Wednesday, June 09, 2004 12:21 AM
    Subject: Re: [campsite-dev] Please help me with a small function


    > Hi Daniel,
    >
    > This wasn't a piece of cake. Campfire uses document structure to
    > generate HTML but your problem needed character level operations.
    >
    > Please, see attached file. Function getSelectionHtml() goes to Camfire
    > class and function generateForSelection() goes to HtmlGenerator class.
    > The solution is very ugly but who cares Smile. It should be enough for
    > you to start developing.
    >
    > I hope that once when I come to Chile you'll buy me some good local
    > drink Smile.
    >
    > Cheers,
    >
    > Nenad
    >
    >
    >
    > On Wednesday 09 of June 2004 01:25, Daniel Gaytan B. wrote:
    > > Thats the whole point, i know that campfire "translates" the plain
    > > text into that pseudo-html, via functions in the applet, so far i
    > > have been unsuccesfull in trying to translate only a portion of the
    > > text, thats why im asking the java gurus out there (im only a humble
    > > padawan in java) to see if they can do it.
    > >
    > > Regards.
    >

    ------------------------------------------
    Posted to Phorum via PhorumMail