Anonymous

Topic: Allowing HTML formatting in description field

I want to get rid of the textile formatting and add the ability for the user to format the text using the tiny mce WYSIWYG text editor.

I have the editor implemented but when i format the text and submit the form the html formatting that tiny mce adds gets stripped out.

Can anyone tell me where this happens so i can disable it?

Thanks

Anonymous

Re: Allowing HTML formatting in description field

anyone?

i just need to be able to use html formatting in the description field.

Anonymous

Re: Allowing HTML formatting in description field

I figured it out.

in function.escape.php

$GLOBALS[$variable] = $db->real_escape_string(strip_tags($value));

striptags($value) is what takes out the html formatting.

Anonymous

Re: Allowing HTML formatting in description field

hi mate, do you mind posting that code for us? I mean the editor, I'm looking for something similar and would appreciate if you could share it.

thanks

Anonymous

Re: Allowing HTML formatting in description field

This is what I was looking for to implement tinymce formats!

But I get undefined variable errors after disabling it.

Would you mind to share a few lines of your codes on this problem?

Anonymous

Re: Allowing HTML formatting in description field

Didn't you get undefined variable errors after removing that line?

I'm getting this error and can not go to step 2...

Anonymous

Re: Allowing HTML formatting in description field

ok, I figured out. By doing like in the following, you can use HTML tags listed below within description field, with limiting other HTML tags.

$GLOBALS[$variable] = $db->real_escape_string(strip_tags($value,'<a><strong><em><p><ul><li><ol><img>'));

mumford

Re: Allowing HTML formatting in description field

Hi

I have the same problem also, where is the file "function.escape.php" I cannot find out it anywhere, I see tiny mce when I want to add a page but not when I am adding a job description, can someone please help, as I need to have the site ready ny today!

Thanks

mumford

Re: Allowing HTML formatting in description field

Okay I have found the page and added this

function escape($what)
{
    global $db;

    foreach ($what as $variable => $value)
    {
        if (is_string($value) || is_numeric($value))
        {
           
            $GLOBALS[$variable] = $db->real_escape_string(strip_tags($value,'<a><strong><em><p><ul><li><ol><img>'));
        }
        else
        {
            $GLOBALS[$variable] = $value;
        }
    }
}
?>

But still cant style the job description to my likieing, the tiny mce editor does not display any ideas?