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

Re: Rich text editor - Toolbar buttons behaviour

Expand Messages
  • Edouard
    Thanks a lot for your reply. Actually I would like to create a new button that sets ALL the text in the editor to bold, wether it is selected or not. Do you
    Message 1 of 6 , Jul 1, 2008
    • 0 Attachment
      Thanks a lot for your reply.

      Actually I would like to create a new button that sets ALL the text in
      the editor to bold, wether it is selected or not.

      Do you think this is possible?

      --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
      >
      > Edouard --
      >
      > There isn't much in the Editor (code) wise that controls those
      buttons, they are passed through to the native document.execCommand
      because the A-Grade browsers actually support them quite well.
      >
      >
      > Can you give me a little more info on what exactly you are looking fo?
      >
      > 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: Edouard <e.devilledep@...>
      > To: ydn-javascript@yahoogroups.com
      > Sent: Tuesday, July 1, 2008 6:25:06 AM
      > Subject: [ydn-javascript] Rich text editor - Toolbar buttons behaviour
      >
      > Hi everybody,
      >
      > could you please tell me in what file is defined the bevaviour of
      > buttons like "bold" or "italic" (Simple Editor's toolbar) ?
      >
      > I would like to understand how they work, but I can't find this piece
      > of code...
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
    • Dav Glass
      Edouard -- Create your new button, then inside that buttons click event you could do something like this: var html = myEditor.getEditorHTML();
      Message 2 of 6 , Jul 1, 2008
      • 0 Attachment
        Edouard --

        Create your new button, then inside that buttons click event you could do something like this:

        var html = myEditor.getEditorHTML();
        myEditor.setEditorHTML('<strong>' + html + '</strong>');

        That won't produce semantic code, but it will make everything bold..

        You could also attach some CSS to the body of the iframe, then on save, wrap the html from the editor in another element with that css applied..

        Does that help?

        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: Edouard <e.devilledep@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Tuesday, July 1, 2008 7:22:16 AM
        Subject: [ydn-javascript] Re: Rich text editor - Toolbar buttons behaviour

        Thanks a lot for your reply.

        Actually I would like to create a new button that sets ALL the text in
        the editor to bold, wether it is selected or not.

        Do you think this is possible?

        --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
        >
        > Edouard --
        >
        > There isn't much in the Editor (code) wise that controls those
        buttons, they are passed through to the native document.execCommand
        because the A-Grade browsers actually support them quite well.
        >
        >
        > Can you give me a little more info on what exactly you are looking fo?
        >
        > 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: Edouard <e.devilledep@...>
        > To: ydn-javascript@yahoogroups.com
        > Sent: Tuesday, July 1, 2008 6:25:06 AM
        > Subject: [ydn-javascript] Rich text editor - Toolbar buttons behaviour
        >
        > Hi everybody,
        >
        > could you please tell me in what file is defined the bevaviour of
        > buttons like "bold" or "italic" (Simple Editor's toolbar) ?
        >
        > I would like to understand how they work, but I can't find this piece
        > of code...
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >



        ------------------------------------

        Yahoo! Groups Links
      • Edouard
        Hey Dav, yes that helps a lot. It is exactly what I was trying to do. Thanks a lot. I didn t find any example dealing with editor s content modification. Would
        Message 3 of 6 , Jul 10, 2008
        • 0 Attachment
          Hey Dav,

          yes that helps a lot. It is exactly what I was trying to do. Thanks a lot.

          I didn't find any example dealing with editor's content modification.
          Would you be interested in my code, to put it for example on your blog?

          --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
          >
          > Edouard --
          >
          > Create your new button, then inside that buttons click event you
          could do something like this:
          >
          > var html = myEditor.getEditorHTML();
          > myEditor.setEditorHTML('<strong>' + html + '</strong>');
          >
          > That won't produce semantic code, but it will make everything bold..
          >
          > You could also attach some CSS to the body of the iframe, then on
          save, wrap the html from the editor in another element with that css
          applied..
          >
          > Does that help?
          >
          > 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: Edouard <e.devilledep@...>
          > To: ydn-javascript@yahoogroups.com
          > Sent: Tuesday, July 1, 2008 7:22:16 AM
          > Subject: [ydn-javascript] Re: Rich text editor - Toolbar buttons
          behaviour
          >
          > Thanks a lot for your reply.
          >
          > Actually I would like to create a new button that sets ALL the text in
          > the editor to bold, wether it is selected or not.
          >
          > Do you think this is possible?
          >
          > --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@> wrote:
          > >
          > > Edouard --
          > >
          > > There isn't much in the Editor (code) wise that controls those
          > buttons, they are passed through to the native document.execCommand
          > because the A-Grade browsers actually support them quite well.
          > >
          > >
          > > Can you give me a little more info on what exactly you are looking fo?
          > >
          > > 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: Edouard <e.devilledep@>
          > > To: ydn-javascript@yahoogroups.com
          > > Sent: Tuesday, July 1, 2008 6:25:06 AM
          > > Subject: [ydn-javascript] Rich text editor - Toolbar buttons behaviour
          > >
          > > Hi everybody,
          > >
          > > could you please tell me in what file is defined the bevaviour of
          > > buttons like "bold" or "italic" (Simple Editor's toolbar) ?
          > >
          > > I would like to understand how they work, but I can't find this piece
          > > of code...
          > >
          > >
          > > ------------------------------------
          > >
          > > Yahoo! Groups Links
          > >
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
        • Dav Glass
          Edouard -- Email the example to me and I ll take a look :D Dav Dav Glass dav.glass@yahoo.com blog.davglass.com + Windows: n. - The most successful computer
          Message 4 of 6 , Jul 10, 2008
          • 0 Attachment
            Edouard --

            Email the example to me and I'll take a look :D

            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: Edouard <e.devilledep@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Thursday, July 10, 2008 6:28:29 AM
            Subject: [ydn-javascript] Re: Rich text editor - Toolbar buttons behaviour

            Hey Dav,

            yes that helps a lot. It is exactly what I was trying to do. Thanks a lot.

            I didn't find any example dealing with editor's content modification.
            Would you be interested in my code, to put it for example on your blog?

            --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
            >
            > Edouard --
            >
            > Create your new button, then inside that buttons click event you
            could do something like this:
            >
            > var html = myEditor.getEditorHTML();
            > myEditor.setEditorHTML('<strong>' + html + '</strong>');
            >
            > That won't produce semantic code, but it will make everything bold..
            >
            > You could also attach some CSS to the body of the iframe, then on
            save, wrap the html from the editor in another element with that css
            applied..
            >
            > Does that help?
            >
            > 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: Edouard <e.devilledep@...>
            > To: ydn-javascript@yahoogroups.com
            > Sent: Tuesday, July 1, 2008 7:22:16 AM
            > Subject: [ydn-javascript] Re: Rich text editor - Toolbar buttons
            behaviour
            >
            > Thanks a lot for your reply.
            >
            > Actually I would like to create a new button that sets ALL the text in
            > the editor to bold, wether it is selected or not.
            >
            > Do you think this is possible?
            >
            > --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@> wrote:
            > >
            > > Edouard --
            > >
            > > There isn't much in the Editor (code) wise that controls those
            > buttons, they are passed through to the native document.execCommand
            > because the A-Grade browsers actually support them quite well.
            > >
            > >
            > > Can you give me a little more info on what exactly you are looking fo?
            > >
            > > 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: Edouard <e.devilledep@>
            > > To: ydn-javascript@yahoogroups.com
            > > Sent: Tuesday, July 1, 2008 6:25:06 AM
            > > Subject: [ydn-javascript] Rich text editor - Toolbar buttons behaviour
            > >
            > > Hi everybody,
            > >
            > > could you please tell me in what file is defined the bevaviour of
            > > buttons like "bold" or "italic" (Simple Editor's toolbar) ?
            > >
            > > I would like to understand how they work, but I can't find this piece
            > > of code...
            > >
            > >
            > > ------------------------------------
            > >
            > > Yahoo! Groups Links
            > >
            >
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >



            ------------------------------------

            Yahoo! Groups Links
          Your message has been successfully submitted and would be delivered to recipients shortly.