Open Source Content Management Framework

Disable html editor?

  1. Disable html editor?

    Mon June 22 2009 16:45:05 UTC
    Hi,

    is there an easy way to disable the html editor for a single page or
    topic? I want to add some form data, but the editor strips the code out.
    Running Midgard 8.09 on that site.

    Thanks
    Andreas



    _______________________________________________
    user mailing list
    user@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/user
    •  Reply
  2. Henri Bergius

    Re: [midgard-user] Disable html editor?

    Mon June 22 2009 17:25:07 UTC
    Hi,

    On Mon, Jun 22, 2009 at 7:13 PM, Andreas Alvarez<alvarez@dgap.org> wrote:
    > is there an easy way to disable the html editor for a single page or
    > topic? I want to add some form data, but the editor strips the code out.
    > Running Midgard 8.09 on that site.

    You'll probably have best experience by running a separate DM2 schema
    for that folder or article.

    http://bergie.iki.fi/blog/page-styling-and-datamanager-schemas/
    http://www.midgard-project.org/documentation/midcom-helper-datamanager2_schema_definition/

    > Andreas

    /Henri

    --
    Henri Bergius
    Motorcycle Adventures and Free Software
    http://bergie.iki.fi/

    Skype: henribergius
    Jabber: henri.bergius@gmail.com
    Microblog: http://www.qaiku.com/home/bergie/
    _______________________________________________
    user mailing list
    user@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/user
    •  Reply
  3. Re: [midgard-user] Disable html editor?

    Mon June 22 2009 18:50:05 UTC
    Henri Bergius wrote:
    > Hi,
    >
    > On Mon, Jun 22, 2009 at 7:13 PM, Andreas Alvarez<alvarez@dgap.org> wrote:
    >> is there an easy way to disable the html editor for a single page or
    >> topic? I want to add some form data, but the editor strips the code out.
    >> Running Midgard 8.09 on that site.
    >
    > You'll probably have best experience by running a separate DM2 schema
    > for that folder or article.
    >
    > http://bergie.iki.fi/blog/page-styling-and-datamanager-schemas/
    > http://www.midgard-project.org/documentation/midcom-helper-datamanager2_schema_definition/
    >

    Remember to disable htmlpurifier as well (though you need SVN version of
    DM2 to do that only for one field, see
    http://trac.midgard-project.org/ticket/1198), since that will probably
    clean out forms as well.

    /Rambo
    _______________________________________________
    user mailing list
    user@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/user
    •  Reply
  4. Re: [midgard-user] Disable html editor?

    Tue June 23 2009 13:35:04 UTC
    Alright, I set up a different schemadb_config where I disabled the html
    editor:

    'content' => Array
    (
    // COMPONENT-REQUIRED
    'title' => 'content',
    'storage' => 'content',
    'required' => true,
    'type' => 'text',
    'type_config' => Array ( 'output_mode' => 'html' ),
    'widget' => 'textarea',
    'widget_config' => Array ( 'width' => 80, 'height' => 25 ),
    ),
    Then used the component configuration in the floating toolbar and told
    n.n.static to use the different schemadb. Working fine so war...
    However, is it possible to disable the htmlpurifer with this schemadb as
    well? (Btw: Since i am entering valid xhtml, why is the purifier
    stripping it out ?) I don't mind it being disabled for the whole
    component while using this specific schemadb

    Thanks
    Andreas
    _______________________________________________
    user mailing list
    user@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/user
    •  Reply
  5. Re: [midgard-user] Disable html editor?

    Tue June 23 2009 13:50:09 UTC
    Andreas Alvarez wrote:
    > Then used the component configuration in the floating toolbar and told
    > n.n.static to use the different schemadb. Working fine so war...
    > However, is it possible to disable the htmlpurifer with this schemadb as
    > well?
    >

    As stated, you need the SVN DM2 to be able to disable purifying on
    per-field basis, if the page is rarely edited you can just globally
    disable purifier for the time you save the content and then re-enable

    >
    > (Btw: Since i am entering valid xhtml, why is the purifier
    > stripping it out ?)
    >

    Because it's only purpose is not to make sure the output is valid but to
    also make sure nothing malicious (or stupid) can happen (like adding
    funny ids to divs on content messing up the layout, or injecting
    javascript or doing funny XSS tricks with forms, or...)

    /Rambo

    _______________________________________________
    user mailing list
    user@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/user
    •  Reply
Designed by Nemein, hosted by Kafit