| User | Post |
|
1:30 pm 16 Aug 2008
| Miko York
Member
| | | |
|
| posts 9 |
|
|
When user pastes the text from webpage, the formatting remains as well. Sometimes it makes text width to be bigger than mail forum's width and post breaks the style. Is there way to forbid using of HTML or automatically reformat any copied text into plain text?
Thank you.
|
|
|
|
|
it really is annoying isn't it! Even worse are those that write a post is MS Word and then copy that in!
It'ss not as easy as it sounds but we are looking into it. I want this too after all!
|
|
|
5:16 pm 16 Aug 2008
| Miko York
Member
| | | |
|
| posts 9 |
|
|
I've noticed that phpBB and Innovision forums have no such problem. They just kill the format of the copied message and you can add formatting manually later. It's better, because my forum members aren't good with HTML coding and formatting. It's better if I could turn off for them the original text formatting.
|
|
|
5:26 pm 16 Aug 2008
| Mr Papa
Moderator
| | Arizona, USA | |
|
| posts 1602 |
|
|
I guess its a question of whether or not you want to support html in post content… we do… phpbb, for example uses bbcode, so yes they can kill all html…
in the next version 3.2, we will have four editors (assuming testing and everything continues on the path it is now): richtext wysiwg (tinymce), html (quicktags), bbcode and a plain textarea… you as admin will be able to control the editors users are allowed to choose from… so if you only enable bbcode, you wont have html issues just like phpbb…
|
|
|
|
|
But you lose a lot of you strip all HTML. No Links. No Images. No Videos. No Bold/Italic… Not even proper paragraphs…
|
|
|
6:19 pm 16 Aug 2008
| Mr Papa
Moderator
| | Arizona, USA | |
|
| posts 1602 |
|
|
I will keep this in our nice little email traffic we have going…
|
|
|
12:06 pm 17 Aug 2008
| Miko York
Member
| | | |
|
| posts 9 |
|
|
My users aren't good with HTML coding and they don't understand what to do when the text they've entered breaks the page style. I prefer to kill all HTML formatting and them format text manually, insert pictures, etc. It is better, that screwed page.
When the new form version going to be out? Please-please ^^
Thank you.
|
|
|
|
|
Really not sure yet but not for a while yet.
You can always add your own filter. See the 'Filters' section in the online help. There is a predefined filter avalable you could use called 'sf_filter_nohtml_kses' which should strip the content..
|
|
|
2:18 pm 15 Sep 2008
| Miko York
Member
| | | |
|
| posts 9 |
|
|
I've read online help, but could you please explain how to use sf_filter_nohtml_kses filter step-by-step?
Thank you very much.
|
|
|
|
|
Well, assuming the content you want to filter is loaded into a variable called $content then you just perform a
$content = sf_filter_nohtml_kses($content);
if, however you want to set it up as a permanent filter on SAVING the post then you can add:
add_filter('sf_save_post_content', 'sf_filter_nohtml_kses');
You should be able to out that in the sf-hook-template.php file. I see no reason why not anyway and it should work from there.
|
|
|
7:41 pm 15 Sep 2008
| Miko York
Member
| | | |
|
| posts 9 |
|
|
I've added string add_filter('sf_save_post_content', 'sf_filter_nohtml_kses'); before the ewnd of file sf-hook-template.php and it worked. Thank you very much!
|
|
|
|
|