Loading ...
Sorry, an error occurred while loading the content.

Rich Text Editor -- stip out the style when doing a paste

Expand Messages
  • aaanwar
    Greetings, I want to be able to strip out any styling (or preferably select styling elements) when a user pasts text into the editor. -- similar to special
    Message 1 of 5 , Feb 1, 2008
    • 0 Attachment
      Greetings,

      I want to be able to strip out any styling (or preferably select
      styling elements) when a user pasts text into the editor.
      -- similar to special paste in Microsoft Office Applications.

      Thanks,

      Arman.
    • Dav Glass
      Arman -- Currently you can t trap the paste cross browser, but you could do something like this: 1. Add a button to the toolbar that opens a panel with a
      Message 2 of 5 , Feb 1, 2008
      • 0 Attachment
        Arman --

        Currently you can't trap the paste cross browser, but you could do something like this:

        1. Add a button to the toolbar that opens a panel with a textarea in it. Let the user paste into the textarea, then parse it before adding it to the Editor.
        2. Listen for the "afterNodeChange" event, then check the data in the editor and filter out the stuff you don't want.
        3. Put a button in the Editor that does the above instead of listening for the event.
        4. Do all of your filtering/cleanup after the Editor saves it's data, but before you post it to the server..

        Hope that helps :)
        Dav

        Dav Glass
        dav.glass@...
        blog.davglass.com



        + Windows: n. - The most successful computer virus, ever. +
        + A computer without a Microsoft operating system is like a dog
        without bricks tied to its head +
        + A Microsoft Certified Systems Engineer is to computing what a
        McDonalds Certified Food Specialist is to fine cuisine +

        ----- Original Message ----
        From: aaanwar <arman.anwar@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Friday, February 1, 2008 5:28:40 PM
        Subject: [ydn-javascript] Rich Text Editor -- stip out the style when doing a paste

        Greetings,

        I want to be able to strip out any styling (or preferably select
        styling elements) when a user pasts text into the editor.
        -- similar to special paste in Microsoft Office Applications.

        Thanks,

        Arman.




        Yahoo! Groups Links
      • aaanwar
        Many thanks Dav, I helps tremendously: 2/4. Is the path I m thinking of going down. On a side note -- what features exist to guarantee HTML well formedness. On
        Message 3 of 5 , Feb 4, 2008
        • 0 Attachment
          Many thanks Dav,

          I helps tremendously:
          2/4. Is the path I'm thinking of going down.

          On a side note -- what features exist to guarantee HTML well formedness.

          On a side side note -- I'm new to YUI and the RTE, do you have a list
          of primer steps that one could go through as a prerequisite to hacking
          RTE.

          Thanks,

          Arman.

          --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
          >
          > Arman --
          >
          > Currently you can't trap the paste cross browser, but you could do
          something like this:
          >
          > 1. Add a button to the toolbar that opens a panel with a textarea in
          it. Let the user paste into the textarea, then parse it before adding
          it to the Editor.
          > 2. Listen for the "afterNodeChange" event, then check the data in
          the editor and filter out the stuff you don't want.
          > 3. Put a button in the Editor that does the above instead of
          listening for the event.
          > 4. Do all of your filtering/cleanup after the Editor saves it's
          data, but before you post it to the server..
          >
          > Hope that helps :)
          > Dav
          >
          > Dav Glass
          > dav.glass@...
          > blog.davglass.com
          >
          >
          >
          > + Windows: n. - The most successful computer virus, ever. +
          > + A computer without a Microsoft operating system is like a dog
          > without bricks tied to its head +
          > + A Microsoft Certified Systems Engineer is to computing what a
          > McDonalds Certified Food Specialist is to fine cuisine +
          >
          > ----- Original Message ----
          > From: aaanwar <arman.anwar@...>
          > To: ydn-javascript@yahoogroups.com
          > Sent: Friday, February 1, 2008 5:28:40 PM
          > Subject: [ydn-javascript] Rich Text Editor -- stip out the style
          when doing a paste
          >
          > Greetings,
          >
          > I want to be able to strip out any styling (or preferably select
          > styling elements) when a user pasts text into the editor.
          > -- similar to special paste in Microsoft Office Applications.
          >
          > Thanks,
          >
          > Arman.
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
        • Dav Glass
          Arman -- The Editor will attempt to make the HTML well formatted, but it should always be passed to a backend language for better parsing and for security
          Message 4 of 5 , Feb 4, 2008
          • 0 Attachment
            Arman --

            The Editor will "attempt" to make the HTML well formatted, but it should always be passed to a backend language for better parsing and for security reasons.

            I don't have anything official as far as "hacking" the editor goes, but feel free to drop me a note with any questions, I'll be happy to help out..

            Dav

            Dav Glass
            dav.glass@...
            blog.davglass.com



            + Windows: n. - The most successful computer virus, ever. +
            + A computer without a Microsoft operating system is like a dog
            without bricks tied to its head +
            + A Microsoft Certified Systems Engineer is to computing what a
            McDonalds Certified Food Specialist is to fine cuisine +

            ----- Original Message ----
            From: aaanwar <arman.anwar@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Monday, February 4, 2008 11:15:12 AM
            Subject: [ydn-javascript] Re: Rich Text Editor -- stip out the style when doing a paste

            Many thanks Dav,

            I helps tremendously:
            2/4. Is the path I'm thinking of going down.

            On a side note -- what features exist to guarantee HTML well formedness.

            On a side side note -- I'm new to YUI and the RTE, do you have a list
            of primer steps that one could go through as a prerequisite to hacking
            RTE.

            Thanks,

            Arman.

            --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
            >
            > Arman --
            >
            > Currently you can't trap the paste cross browser, but you could do
            something like this:
            >
            > 1. Add a button to the toolbar that opens a panel with a textarea in
            it. Let the user paste into the textarea, then parse it before adding
            it to the Editor.
            > 2. Listen for the "afterNodeChange" event, then check the data in
            the editor and filter out the stuff you don't want.
            > 3. Put a button in the Editor that does the above instead of
            listening for the event.
            > 4. Do all of your filtering/cleanup after the Editor saves it's
            data, but before you post it to the server..
            >
            > Hope that helps :)
            > Dav
            >
            > Dav Glass
            > dav.glass@...
            > blog.davglass.com
            >
            >
            >
            > + Windows: n. - The most successful computer virus, ever. +
            > + A computer without a Microsoft operating system is like a dog
            > without bricks tied to its head +
            > + A Microsoft Certified Systems Engineer is to computing what a
            > McDonalds Certified Food Specialist is to fine cuisine +
            >
            > ----- Original Message ----
            > From: aaanwar <arman.anwar@...>
            > To: ydn-javascript@yahoogroups.com
            > Sent: Friday, February 1, 2008 5:28:40 PM
            > Subject: [ydn-javascript] Rich Text Editor -- stip out the style
            when doing a paste
            >
            > Greetings,
            >
            > I want to be able to strip out any styling (or preferably select
            > styling elements) when a user pasts text into the editor.
            > -- similar to special paste in Microsoft Office Applications.
            >
            > Thanks,
            >
            > Arman.
            >
            >
            >
            >
            > Yahoo! Groups Links
            >





            Yahoo! Groups Links
          • aaanwar
            Kool, any recommendations on a javascript IDE -- vi ? Thanks, Arman. ... should always be passed to a backend language for better parsing and for security
            Message 5 of 5 , Feb 4, 2008
            • 0 Attachment
              Kool, any
              recommendations on a javascript IDE -- vi ?

              Thanks,

              Arman.

              --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
              >
              > Arman --
              >
              > The Editor will "attempt" to make the HTML well formatted, but it
              should always be passed to a backend language for better parsing and
              for security reasons.
              >
              > I don't have anything official as far as "hacking" the editor goes,
              but feel free to drop me a note with any questions, I'll be happy to
              help out..
              >
              > Dav
              >
              > Dav Glass
              > dav.glass@...
              > blog.davglass.com
              >
              >
              >
              > + Windows: n. - The most successful computer virus, ever. +
              > + A computer without a Microsoft operating system is like a dog
              > without bricks tied to its head +
              > + A Microsoft Certified Systems Engineer is to computing what a
              > McDonalds Certified Food Specialist is to fine cuisine +
              >
              > ----- Original Message ----
              > From: aaanwar <arman.anwar@...>
              > To: ydn-javascript@yahoogroups.com
              > Sent: Monday, February 4, 2008 11:15:12 AM
              > Subject: [ydn-javascript] Re: Rich Text Editor -- stip out the style
              when doing a paste
              >
              > Many thanks Dav,
              >
              > I helps tremendously:
              > 2/4. Is the path I'm thinking of going down.
              >
              > On a side note -- what features exist to guarantee HTML well formedness.
              >
              > On a side side note -- I'm new to YUI and the RTE, do you have a list
              > of primer steps that one could go through as a prerequisite to hacking
              > RTE.
              >
              > Thanks,
              >
              > Arman.
              >
              > --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@> wrote:
              > >
              > > Arman --
              > >
              > > Currently you can't trap the paste cross browser, but you could do
              > something like this:
              > >
              > > 1. Add a button to the toolbar that opens a panel with a textarea in
              > it. Let the user paste into the textarea, then parse it before adding
              > it to the Editor.
              > > 2. Listen for the "afterNodeChange" event, then check the data in
              > the editor and filter out the stuff you don't want.
              > > 3. Put a button in the Editor that does the above instead of
              > listening for the event.
              > > 4. Do all of your filtering/cleanup after the Editor saves it's
              > data, but before you post it to the server..
              > >
              > > Hope that helps :)
              > > Dav
              > >
              > > Dav Glass
              > > dav.glass@
              > > blog.davglass.com
              > >
              > >
              > >
              > > + Windows: n. - The most successful computer virus, ever. +
              > > + A computer without a Microsoft operating system is like a dog
              > > without bricks tied to its head +
              > > + A Microsoft Certified Systems Engineer is to computing what a
              > > McDonalds Certified Food Specialist is to fine cuisine +
              > >
              > > ----- Original Message ----
              > > From: aaanwar <arman.anwar@>
              > > To: ydn-javascript@yahoogroups.com
              > > Sent: Friday, February 1, 2008 5:28:40 PM
              > > Subject: [ydn-javascript] Rich Text Editor -- stip out the style
              > when doing a paste
              > >
              > > Greetings,
              > >
              > > I want to be able to strip out any styling (or preferably select
              > > styling elements) when a user pasts text into the editor.
              > > -- similar to special paste in Microsoft Office Applications.
              > >
              > > Thanks,
              > >
              > > Arman.
              > >
              > >
              > >
              > >
              > > Yahoo! Groups Links
              > >
              >
              >
              >
              >
              >
              > Yahoo! Groups Links
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.