[campsite-dev] kill word formatting in xinha
  • hi list,

    i seem to remember that there was some talk about how to deal with
    word formatting when copy and paste to xinha - i.e. kill it all Smile

    is that an option that can be set in campsite? or is it a xinha
    module that can be added to xinha manually?

    we run into problems, because some of the formatting that arrives in
    the html in xinha can not be deleted with the available features in
    xinha. and switching to source view would mean that the editors would
    learn to understand what is redundant html tagging and what is not.

    thanks,

    Micz Flor
    ____________________________________
    [Konzept und Entwicklung]
    Redaktion und Alltag - Flor Lay GbR
    ____________________________________
    Pasteurstrasse 8
    10407 Berlin
    t: +49.30.44044999
    f: +49.30.42085272
    e: flor@redaktionundalltag.de
    ____________________________________
    http://www.fluter.de
    http://www.redaktionundalltag.de

    http://www.berlin.de/stadtplan/map.asp?ADR_ZIP=10407&ADR_STREET=pasteurstra%DFe&ADR_HOUSE=8
  • 3 Comments sorted by
  • If you simply paste text in html view, all formatings are gone. Or at
    least I would expect it.
    In my opinion spending time with paste feature is wrong way.
    I would simply add feature to article type, that allows automatically
    generate word and openoffice and may be xml templates to be used with
    the article type.
    Than you can simply add "import article" feature and let authors to use
    your predefined templates.

    Ondra

    On Thu, 2006-06-15 at 11:15 +0200, Micz Flor wrote:
    > hi list,
    >
    > i seem to remember that there was some talk about how to deal with
    > word formatting when copy and paste to xinha - i.e. kill it all Smile
    >
    > is that an option that can be set in campsite? or is it a xinha
    > module that can be added to xinha manually?
    >
    > we run into problems, because some of the formatting that arrives in
    > the html in xinha can not be deleted with the available features in
    > xinha. and switching to source view would mean that the editors would
    > learn to understand what is redundant html tagging and what is not.
    >
    > thanks,
    >
    > Micz Flor
    > ____________________________________
    > [Konzept und Entwicklung]
    > Redaktion und Alltag - Flor Lay GbR
    > ____________________________________
    > Pasteurstrasse 8
    > 10407 Berlin
    > t: +49.30.44044999
    > f: +49.30.42085272
    > e: flor@redaktionundalltag.de
    > ____________________________________
    > http://www.fluter.de
    > http://www.redaktionundalltag.de
    >
    > http://www.berlin.de/stadtplan/map.asp?ADR_ZIP=10407&ADR_STREET=pasteurstra%DFe&ADR_HOUSE=8
    >
  • hm... some basic parsing would be easy. i used it in docmint as a
    function that you can switch on or off that parses some style stuff
    inside tags. it goes like this (as you can see, there could be more
    in the regex array):

    function HTMLAreaStripSpecialFormatting($return)
    {
    $htmlarea_killarray = array(
    "/(style|face|class|size)=(\'|\"|)(.|\n)*?(\'|\"|>)/i",
    );
    foreach ($htmlarea_killarray as $htmlarea_kill) {
    $return = preg_replace($htmlarea_kill, "", $return);
    }
    return $return;
    }t

    At 11:22 15.06.2006, you wrote:
    >If you simply paste text in html view, all formatings are gone. Or at
    >least I would expect it.
    >In my opinion spending time with paste feature is wrong way.
    >I would simply add feature to article type, that allows automatically
    >generate word and openoffice and may be xml templates to be used with
    >the article type.
    >Than you can simply add "import article" feature and let authors to use
    >your predefined templates.
    >
    >Ondra
    >
    >On Thu, 2006-06-15 at 11:15 +0200, Micz Flor wrote:
    > > hi list,
    > >
    > > i seem to remember that there was some talk about how to deal with
    > > word formatting when copy and paste to xinha - i.e. kill it all Smile
    > >
    > > is that an option that can be set in campsite? or is it a xinha
    > > module that can be added to xinha manually?
    > >
    > > we run into problems, because some of the formatting that arrives in
    > > the html in xinha can not be deleted with the available features in
    > > xinha. and switching to source view would mean that the editors would
    > > learn to understand what is redundant html tagging and what is not.
    > >
    > > thanks,
    > >
    > > Micz Flor
    > > ____________________________________
    > > [Konzept und Entwicklung]
    > > Redaktion und Alltag - Flor Lay GbR
    > > ____________________________________
    > > Pasteurstrasse 8
    > > 10407 Berlin
    > > t: +49.30.44044999
    > > f: +49.30.42085272
    > > e: flor@redaktionundalltag.de
    > > ____________________________________
    > > http://www.fluter.de
    > > http://www.redaktionundalltag.de
    > >
    > >
    > http://www.berlin.de/stadtplan/map.asp?ADR_ZIP=10407&ADR_STREET=pasteurstra%DFe&ADR_HOUSE=8
    > >


    Micz Flor - micz@mi.cz

    content and media development http://mi.cz
    --------------------------------------------------------
    http://www.campware.org -- http://www.suemi.de
    http://www.redaktionundalltag.de
    --------------------------------------------------------
  • Hello,

    No need to get fancy. Xinha already takes care of it quite ok. but there is
    a bug under Firefox:

    http://code.campware.org/projects/campsite/ticket/1680

    Essentially, you need to enable popups, and then use the popup we supply
    for pasting. And everything should be fine.

    You can also play with the AllowClipboard Helper extension of Firefox,
    which enables you to add a site to those where pasting is allowed. This
    extension may interact funnily with our popup, so that is why I am saying,
    play around (i.e. I found out that it worked for me when i DISABLED popups
    on the site, then added the site to the list of allowed sites in
    AllowClipboard Helper, and everything seems to work fine). I think ACH or
    similar would be the way to go (popups are annoying and slow down stuff, so
    if we can avoid them, that is one of the only ways to do it under FF).

    Sava





    Micz Flor
    > cc:
    Sent by: Subject: Re: [campsite-dev] kill word formatting in xinha
    micz.flor@web.de


    06/15/2006 11:28
    AM
    Please respond to
    campsite-dev






    hm... some basic parsing would be easy. i used it in docmint as a
    function that you can switch on or off that parses some style stuff
    inside tags. it goes like this (as you can see, there could be more
    in the regex array):

    function HTMLAreaStripSpecialFormatting($return)
    {
    $htmlarea_killarray = array(
    "/(style|face|class|size)=(\'|\"|)(.|\n)*?(\'|\"|>)/i",
    );
    foreach ($htmlarea_killarray as $htmlarea_kill) {
    $return = preg_replace($htmlarea_kill, "", $return);
    }
    return $return;
    }t

    At 11:22 15.06.2006, you wrote:
    >If you simply paste text in html view, all formatings are gone. Or at
    >least I would expect it.
    >In my opinion spending time with paste feature is wrong way.
    >I would simply add feature to article type, that allows automatically
    >generate word and openoffice and may be xml templates to be used with
    >the article type.
    >Than you can simply add "import article" feature and let authors to use
    >your predefined templates.
    >
    >Ondra
    >
    >On Thu, 2006-06-15 at 11:15 +0200, Micz Flor wrote:
    > > hi list,
    > >
    > > i seem to remember that there was some talk about how to deal with
    > > word formatting when copy and paste to xinha - i.e. kill it all Smile
    > >
    > > is that an option that can be set in campsite? or is it a xinha
    > > module that can be added to xinha manually?
    > >
    > > we run into problems, because some of the formatting that arrives in
    > > the html in xinha can not be deleted with the available features in
    > > xinha. and switching to source view would mean that the editors would
    > > learn to understand what is redundant html tagging and what is not.
    > >
    > > thanks,
    > >
    > > Micz Flor
    > > ____________________________________
    > > [Konzept und Entwicklung]
    > > Redaktion und Alltag - Flor Lay GbR
    > > ____________________________________
    > > Pasteurstrasse 8
    > > 10407 Berlin
    > > t: +49.30.44044999
    > > f: +49.30.42085272
    > > e: flor@redaktionundalltag.de
    > > ____________________________________
    > > http://www.fluter.de
    > > http://www.redaktionundalltag.de
    > >
    > >
    >
    http://www.berlin.de/stadtplan/map.asp?ADR_ZIP=10407&ADR_STREET=pasteurstra%DFe&ADR_HOUSE=8

    > >


    Micz Flor - micz@mi.cz

    content and media development http://mi.cz
    --------------------------------------------------------
    http://www.campware.org -- http://www.suemi.de
    http://www.redaktionundalltag.de
    --------------------------------------------------------





    Invest in Press Freedom: Visit http://www.mdlf.org/support-free-press