SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    html editor (with find, replace and preview)

    i posted a thread the other day asking how i could find an replace certain text in a text area using javascript, in this thread. now what im trying to do is add a preview to whatever is replaced. using this script.

    alone, they work perfectly but but i cant get it to work together... this is what i got so far

    http://www.board-source.com/htmledit.php

    if anyone could take the time to help me figure this out id really appreciate it

  2. #2
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone?

  3. #3
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,417
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    www.htmlarea.com has loads of similar editors listed

  4. #4
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah but most of does cost money and i really was looking for something a lot simpler, no wyiswg editors, just text areas where users can edit the text and it shows a preview... thats it

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are many errors and warnings in your code. First, validate it here, to see all errors and warnings. Then try to repair them.
    But I think you don't have to use iframe for preview. Instead you could use a div. Replace _iframe tag_ with:
    Code HTML4Strict:
    <div id="prew" style="border:1px solid black;"></div>
    and then replace _button Generate preview tag_ with:
    Code HTML4Strict:
    <input type="button" value="Generate Preview" onclick="document.getElementById('prew').innerHTML = document.getElementById('t3').value">

  6. #6
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that worked bro, thanks a whole lot


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •