Results 1 to 4 of 4

Thread: [RESOLVED] wysiwyg editors

  1. #1

    Thread Starter
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Resolved [RESOLVED] wysiwyg editors

    first let me confess that i have absolutely no idea abt php and very faint idea abt html ,but i am sure that i will understand the code as i am good at other languages

    so my doubt is on my website i want to put up a wysiwyg editor(or a simple text box) where any user can type his/her review and on clicking the submit button ,their review gets added to the database(mysql) and the content added to a page.

    if someone can post a solution it would be really helpful.(or any helpful links)
    thanks a million in advance
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

  2. #2
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: wysiwyg editors

    All you need is a simple praser, like:
    PHP Code:
    $bodytag str_replace("%body%""black""<body text='%body%'>"); 
    Except you probably want something like:
    PHP Code:
    $bodytag str_replace("\n""<br>"$_POST['websitetext']); 
    (Obviously you will need to expand on that to filter out tabs, and other formating.)
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  3. #3

    Thread Starter
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: wysiwyg editors

    Quote Originally Posted by k1ll3rdr4g0n
    All you need is a simple praser, like:
    PHP Code:
    $bodytag str_replace("%body%""black""<body text='%body%'>"); 
    Except you probably want something like:
    PHP Code:
    $bodytag str_replace("\n""<br>"$_POST['websitetext']); 
    (Obviously you will need to expand on that to filter out tabs, and other formating.)
    so $bodytag is the variable to store the text that is entered in the "websitetext" object(text box object) ,am i right??

    how am i then supposed to update the page which iam going to display( inside a frame) in the same page as the textbox should i use the echo "$bodytag" command ?
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

  4. #4
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: wysiwyg editors

    Yup.
    You could always open the file with php and output to the textbox if you want to edit it.
    Or if you just display it in a frame you could just iframe it, or if you want to it properly, you can open the file with php and store it all in a variable and echo (or print, whichever you prefer) the variable.
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

Posting Permissions

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



Click Here to Expand Forum to Full Width