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

34216Re: Rich text editor - Toolbar buttons behaviour

Expand Messages
  • Edouard
    Jul 10 6:28 AM
    • 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
      >
    • Show all 6 messages in this topic