Re: setting cuteeditor text links

  •  01-25-2005, 10:38 AM

    Re: setting cuteeditor text links

    Thank you Adam.  Let me clarify what I'm doing; I'm sorry to be confusing.

    I have a webform with several editor boxes.  Users will input various text into the boxes which may include links and formatted items.  The users have no knowledge of HTML so they will only be inputting information in the NORMAL setting of the editor.  A submit button exists on the form that will take the HTML value of every box and insert them into a SQL database table.  A user may go back and want to change the inputted text of those boxes.  This is where the problem occurs.  The form is supposed to load and input the database table HTML text value into each appropriate editor box.  What I initially did was set it so that the text value of each box equals the database returned text.  The problem arises with links: links are interpretted by the text value of the editor the same way a label would interpret it: it sets the link to the server value as opposed to what the link is supposed to be and doesn't put the </a> closing tag into the proper place.   For example, if i had a cnn.com link, and my server was http://chilton, instead of producing <a href="http://cnn.com">cnn.com</a> it would produce <a href="http://chilton">cnn.com and some additonal text from the database table but should not be linked</a>. I could think of a couple theorectical solutions:

    (1) set the literal HTML value of the editor box onload to equal the text returned from the database in which a javascript solution wouldn't be the best solution, but I would need to do this in the code behind of the form, not via javascript because the form won't be able to set the value of the text boxes onload after I retrieve the database information so it would not set the values at all.
    (2) If a user inputs a URL like http://www.cnn.com, I want it so the text box will not automatically make it a link--just leave it as text--is there a way to do that?

    Thanks for your time!
    Alice
View Complete Thread