For the first scenario you would could be a bit sneaky by hiding the filter
select via JS (or perhaps overriding the _page_part.html.haml partial in
your extension), and automatically setting it via JS or hardcoding it via a
before_save hook on PagePart.

For the second scenario (data cleanup), using a before_save hook on PagePart
is the simplest way to get rid of dirty MS Word markup, as well as dealing
with some of FCK's quirky markup. If you add a before_save hook, you can
modify the content on its way back in the database to remove all troublesome
markup, Office tags, etc. You might also find using Hpricot or Nokogiri
useful for fixing/standardizing the markup.

-Alex

On Tue, Nov 24, 2009 at 12:17 AM, Cliff <cgali...@gmail.com> wrote:

> Is there a setting or an existing extension that locks down which filters
> are available to users?
>
> In one scenario, I've installed the FckEditor extension is installed and
> FckEditor is customized to meet the team's needs.  I'd like to make this the
> required filter for standard users when creating new pages.  This would
> allow some lockdown on what can and cannot be pubished, which would also
> help in my second scenario below.
>
> In another scenario, I have one of our blog authors who has some old habits
> I just can't break. Most notably they still like to use MS Word to write up
> their text.  Since MS Word generates *horrendous* HTML, I'd like to prevent
> HTML from being used.  I'd use <r:escape_html> for this and nest the
> content, but because of the order that nested tags are done, this causes
> proper HTML generated by the textile or markdown filters to get escaped as
> well.  I'd like to find a way to all users to continue using textile or even
> raw HTML, but prresent some form of whitelist for what can be used. No
> embedded styles, for example, and only certain tags.
>
> Thoughts?
>
>
> -Cliff
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to