Configuring filters

Filtered HTML vs Full HTML

In "Administer -> Input formats", Filtered HTML is the default filter. Due to security reasons, enabling Full HTML is only an option for trusted users.

What can you do to take the full advantage of using FCKeditor?

The first thing to do is to extend the list of allowed tags to:

<a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> 
<hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> 
<b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> 
<pre> <address> <code> <cite> <embed> <object> <strike> <caption>

But there is still one problem: Filtered HTML not only strips disallowed tags, but also strips inline style definitions. Basically, it means that you are unable to apply different font color, size, family etc. using FCKeditor 2.5 out of the box.

Don't worry, you still have at least three ways of dealing with it:

  1. Allow trusted users to use Full HTML and accept that other users will have limited functionality, e.g. assign to their profile a different, simpler toolbar
  2. Modify fckeditor.config.js so that FCKeditor used the old-fashion way of applying styles - using <font> tag... remember it's your choice ;)
    so if you really want to do this, add these lines at the end of fckeditor.config.js:
    FCKConfig.CoreStyles['FontFace'] = 
    { 
    	Element		: 'font', 
    	Attributes : { 'face' : '#("Font")' }
    };
    FCKConfig.CoreStyles['Size'] = 
    { 
    	Element		: 'font', 
    	Attributes : { 'size' : '#("Size","fontSize")' }
    };
    FCKConfig.CoreStyles['Color'] = 
    { 
    	Element		: 'font', 
    	Attributes : { 'color' : '#("Color","color")' }
    };
    FCKConfig.FontSizes	= '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;

    with this code, you are able to use 'FontFormat','FontName','FontSize','TextColor' buttons/combo boxes even with Filtered HTML.
     
  3.  Instead of using 4 buttons for formatting text: 'FontFormat','FontName','FontSize','TextColor' use only one 'Style' button with predefined styles in fckstyles.xml.

 Line break converter

 The other thing that may be irritating when using rich text editor is Line break converter. Since you are using "WYSIWYG" editor, you don't want to have your source code parsed again by Drupal, because you have already placed page breaks where you had to do it. In other words, you might probably want to disable that feature.

Comments

 text should be red, but it

 text should be red, but it isnt 

<code>if( $a > $b ){    

<code>

if( $a > $b ){

     echo("ciao");

}

</code>

 

"internal:node/1"

WYSIWYG Filter

I can just recommend the WYSIWYG Filter module. It can be used as a replacement for the integrated HTML Filter as it allows a much finer customization. I'm using the following whitelist in conjunction with FCKeditor:

___FCKsi___1___FCKsi___1___FCKsi___1@[id|class|style|title],
a[href|name|target<_blank],
div[align<center?justify?left?right],
p[align<center?justify?left?right],
br,hr,span,
b,i,em,strong,strike,sub,sup,address,del,ins,font,
cite,quote,code,blockquote,pre,code,caption,
ul,ol,li,dl,dt,dd,
h1,h2,h3,h4,h5,h6,
img[!src],
table,tr,th,td

The inline-style-whitelist can be configured as you like, most properties are ok to allow.

Best regards, kroimon

ISSUES WITH STYLE TAG

I noticed that when I import a picture and I define borders, position and so on, FCK writes those tag inside CLASS end not STYLE.

As result, when I preview or save the message/article, what I see is that no borders, paddings and so on are applied.

In what manner could I solve this issue please ?

largo

fdgfgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg123

123

1

2

3

 How can i make a table

 How can i make a table work propaly with width =100% and aligned right

11
11
11

. Looks like i cant! ! !  !!!! ! !       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!

 

me@hotmail.com

email link not working

Why does the email link send me to a page instead of opening my email client?

111 1111 оорпорпо

111
 1
111

 оорпорпо hj а       hgjfgjghj hgj fарп орпо hgj 

hgj

по

по

по

hg