SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rich Text Editor?

    Hey all,
    I've made a little PHP/mysql backend for my webpages so I can edit them "on the fly". However, to speed it up even more I'd love a rich text editor kind of like the one I'm using now in this forum.

    Has anyone done this and can recommend one to me?

    I've searched the internet and tried a few from CMS(es), but none seem to play nice.

    Thanks in advance,
    Bazzlad

  2. #2
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,561
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fckeditor

  3. #3
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i've been playing with this one recently: http://www.unverse.net/wysiwyg-pic.html

  4. #4
    SitePoint Wizard masm50's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    2,508
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    fckeditor, TinyMCE, HtmlArea are some options

    -Tim

  5. #5
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Thanks for the suggestions, I've gone with Whizzywig (well trying to go with)
    This is my problem, I can't seem to intergrate it!

    My PHP code at the mo is:

    Code:
    printf("
    <form action=action.php method=post>
    <p><textarea rows=10 name='data' cols=35>%s</textarea></p><br>
    <p><input type=submit value=Update /></p>
    </form>\n",$myrow[0]);
    }

    And I need to fit this in:
    Code:
    <textarea id="edited" style="width:95%; height:300px"> 
    </textarea>
    <script type="text/javascript">
    buttonPath = "/buttons"; //directory holding button images
    makeWhizzyWig("edited", "all");
    </script>
    <input type="submit" value="Submit"></form>
    As stupid as it sounds, it doesn't work when I do it.

    Help!

  6. #6
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i had to have a slash ending my buttons path:
    buttonPath = "/buttons/";
    what's going wrong exactly?

  7. #7
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i also have the name and id the same for the text area. i notice that you have it name=data in one and id=edited the other

  8. #8
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just get a box with no rich text editor

    I used this code:
    Code:
    printf("
    <form action=action.php method=post>
     <p><textarea rows=10 name='data' cols=35>&#37;s</textarea></p><br>
    <script type='text/javascript'><br>
    buttonPath = '/buttons';<br>
    makeWhizzyWig('data', 'all');
    </script>
     <p><input type=submit value=Update /></p>
    </form>\n",$myrow[0]);
    }

  9. #9
    SitePoint Zealot Hulkur's Avatar
    Join Date
    Oct 2001
    Location
    Estonia
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to have an id on textarea.
    First parameter for makeWhizzyWig() is id.
    (2B) or (not 2B) = FF

  10. #10
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your help, still no joy -
    This is what I'm using now...
    Code:
    printf("
    <form action=action.php method=post>
     <p><textarea rows=10 id='data' name='data' cols=35>&#37;s</textarea></p><br>
    <script type='text/javascript'><br>
    buttonPath = '/buttons';<br>
    makeWhizzyWig('data', 'all');<br>
    </script>
     <p><input type=submit value=Update /></p>
    </form>\n",$myrow[0]);
    }

  11. #11
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bazzlad View Post
    Thank you for your help, still no joy -
    This is what I'm using now...
    Code:
    printf("
    <form action=action.php method=post>
     <p><textarea rows=10 id='data' name='data' cols=35>%s</textarea></p><br>
    <script type='text/javascript'><br>
    buttonPath = '/buttons';<br>
    makeWhizzyWig('data', 'all');<br>
    </script>
     <p><input type=submit value=Update /></p>
    </form>\n",$myrow[0]);
    }
    remove the <br> tags inside your javascript code area (bold and red above), it's prolly killing the script...

  12. #12
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh and as i said a couple of replies up, you need and ending slash on your button path...


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
  •