I've been using FCK editor with Drupal for some time. I run a website with three major roles using FCK editor; Admin, Editor, Blogger. Admins can publish any type of html and because of this we don't have any problem with the editor. However, it is the Editor and Blogger roles, which use the same Input Format filter to prevent malicious code being inserted into the site accidentally.
The problem is that Drupal only allows so many input formats HTML codes in their limited box. Below is the code I currently have implemented for Editors and Bloggers.
Safe Code:
<a> <p> </p> <span> <div> <h1> <h2> <img> <center> <area> <hr> <br> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote><br /> <pre> <address> <code> <cite><embed> <object> <strike>
The Problem: The problem is that with this combination of code not everything works in the editor. Primarily because there isn't enough room to get enough code into the limited space.
Colored Text icon doesn't work.
Left, Right icons do not work but the system defaults to left aligned.
Center icon does not work but to get around that we've been using <center></center>.
Headings - Only the h2 works, all others revert to default text size.
Pagebreak doesn't work, but I've found a Drupal module to help with that problem.
Increase Indent doesn't work.
In order to try and help anyone who knows something about this I've copied test gibberish I've formatted that could be posted but the input formats zap it because they aren't apart of the safe list above.
From what I can tell it the approved code includes <span> and <div> so I don't understand why they aren't working. There wasn't room for the heading tags because I don't know how many of the "safe code" are unnecessary.
May be helpful: The editor uses <br> instead of <p>.
I would really appreciate any help anyone might able to provide. HTML is not my strong suite but I know that the system needs to have the blockquote, embed, and object codes in order for us to embed content and blockquote content. If anyone has any idea how I can maximize the amount of tags and get these other things to work that would be awesome.
Thanks in advance.
The problem is that Drupal only allows so many input formats HTML codes in their limited box. Below is the code I currently have implemented for Editors and Bloggers.
Safe Code:
<a> <p> </p> <span> <div> <h1> <h2> <img> <center> <area> <hr> <br> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote><br /> <pre> <address> <code> <cite><embed> <object> <strike>
The Problem: The problem is that with this combination of code not everything works in the editor. Primarily because there isn't enough room to get enough code into the limited space.
Colored Text icon doesn't work.
Left, Right icons do not work but the system defaults to left aligned.
Center icon does not work but to get around that we've been using <center></center>.
Headings - Only the h2 works, all others revert to default text size.
Pagebreak doesn't work, but I've found a Drupal module to help with that problem.
Increase Indent doesn't work.
In order to try and help anyone who knows something about this I've copied test gibberish I've formatted that could be posted but the input formats zap it because they aren't apart of the safe list above.
<span style="color: #ff0000">First line red = akdfsasdfkasdf;asfdjkasfhasdfaskfajsfhasf</span> <div style="text-align: right">Second line right aligned = as</div> <div style="text-align: center">second line centered = dfasfkasjhfa;sdfasjfhas;fja</div> <h3>Heading 3 = fashfa;skfhas;dfkjhasf;asfadfssd;fa</h3> <h4>Heading 4 = asdfasdfasd</h4> <h5>Heading 5 = asdfasdfaf</h5> <div style="margin-left: 40px">asgasf</div> <br /> asdfasa
From what I can tell it the approved code includes <span> and <div> so I don't understand why they aren't working. There wasn't room for the heading tags because I don't know how many of the "safe code" are unnecessary.
May be helpful: The editor uses <br> instead of <p>.
I would really appreciate any help anyone might able to provide. HTML is not my strong suite but I know that the system needs to have the blockquote, embed, and object codes in order for us to embed content and blockquote content. If anyone has any idea how I can maximize the amount of tags and get these other things to work that would be awesome.
Thanks in advance.