Re: [campsite-dev] Please help me with a small function
  • Ill try to explain myself a bit better:


    on the previous example, if on the editor you can read
    "this is a Link and this is not" <---- the word "Link" with a blue
    underline meaning its a external link
    the code it will generate is:
    "this is a Link and
    this is not"

    When you are editing an article, and you copy some text (using CTRL-C or
    some other way) it only copies the characters, not the properties of those
    characters,
    so if i drag the mouse over the text and select
    "is a Link and" <---- please note that on the editor the word "Link"
    has a blue underline meaning its a external link
    then i press CTRL-C and insert that text at the end of the text it will
    generate:

    "this is a Link and this is not is a Link and"

    but only the first "Link" will actually be a link..... (and have a blue
    underline)
    so if i save at this point, it will save

    "this is a Link and
    this is not is a Link and"

    what i need is a function that if i select some text on the editor, it will
    not only copy the characters, but also the properties of the text, so that
    if i copy that same portion of the text and paste it at then end of the
    sentence it will output:

    "this is a Link and this is not is a Link and"

    and both ocurrences of the word "Link" will have a blue underline so that if
    i save them it will output:

    "this is a Link and
    this is not is a Link and"

    am i being clear enough?

    ill try to explain it in some other way:

    if you write the following in the editor:

    "to go to google click here"

    then you add an external link to the word here and save. you will see
    the code it saves is:

    " to go to google click here link>"

    if i select the whole the whole sentence, then CTRL-C and then i paste
    it to the wordpad or any other aplication it will paste:

    "to go to google click here"

    but i need it to paste the code that is really inserted into the
    database, so if i select the whole the whole sentence, then CTRL-C and then
    i paste it to the wordpad or any other aplication it should paste:

    " to go to google click here link>"

    am i being clear enough??

    in few words, i need a function that given a selection start, and a
    selection end it returns the "html" of that selection.


    hope that helps to clear stuff.

    Regards







    ----- Original Message -----
    From: "Micz Flor"
    To:
    Sent: Tuesday, June 08, 2004 7:20 AM
    Subject: Re: [campsite-dev] Please help me with a small function


    > At 18:43 08.06.2004, you wrote:
    > >well here is the problem.
    > >
    > >i need a function that if i select some text on the screen it generates
    the
    > >output that is saved to the database.
    > >
    > >on the example above, if i selected the following "is a Link and" the
    > >function will output:
    > >
    > >" is a Link and"
    >
    > i don't really understand what you want to do.
    >
    > Micz Flor - micz@mi.cz
    >
    > content and media development http://mi.cz
    > -----------------------------------------------------------------
    > http://www.campware.org -- http://crash.mi.cz -- http://sue.mi.cz
    > "Ja, da hatte einer einen Punk geklaut." (Sebastian Goebel)
    > -----------------------------------------------------------------
    >

    ------------------------------------------
    Posted to Phorum via PhorumMail
  • 1 Comment sorted by
  • At 20:17 08.06.2004, you wrote:
    >am i being clear enough?

    yes. i guess this is a problem with the operating system, the copy and
    paste function. the only workaround i could think of would be using a
    template with something like this:
    --
    this is the <a href="templatename.tpl?">Link</a>
    --

    this should display as:

    this is the href="templatename.tpl?IdLanguage=5&IdPublication=2&NrIssue=28&NrSection=41&NrArticle=2973">Link

    hope this helps...


    Micz Flor - micz@mi.cz

    content and media development http://mi.cz
    -----------------------------------------------------------------
    http://www.campware.org -- http://crash.mi.cz -- http://sue.mi.cz
    "Ja, da hatte einer einen Punk geklaut." (Sebastian Goebel)
    -----------------------------------------------------------------

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