execCommand behaviours

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

execCommand behaviours

sarv
Hi all,

In which part of the mozilla source code can i find the behaviour of
browsers execCommands (ctrl+b, ctrl+i, etc) when they are invoked in
'contentEditable = true' elements.

Basically i wanted to know all the default behaviours of browser's
execCommands and override them in **javascript** so that any exec
command creates only 'SPAN' and 'P' tags. for example when i select a
content and press 'ctrl+b' instead of <b> tag i need to put <span>
with appropriate styles.

Please help.

Thanks in advance,
Saravanan.S
_______________________________________________
dev-tech-editor mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-editor
Reply | Threaded
Open this post in threaded view
|

Re: execCommand behaviours

Martijn-4
 https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#
might be of help to you.

Btw, don't you want to use 'styleWithCSS', which seems to be the
behavior you want.


Regards,
Martijn


On Mon, Jan 18, 2010 at 11:38 AM, sarv <[hidden email]> wrote:

> Hi all,
>
> In which part of the mozilla source code can i find the behaviour of
> browsers execCommands (ctrl+b, ctrl+i, etc) when they are invoked in
> 'contentEditable = true' elements.
>
> Basically i wanted to know all the default behaviours of browser's
> execCommands and override them in **javascript** so that any exec
> command creates only 'SPAN' and 'P' tags. for example when i select a
> content and press 'ctrl+b' instead of <b> tag i need to put <span>
> with appropriate styles.
>
> Please help.
>
> Thanks in advance,
> Saravanan.S
> _______________________________________________
> dev-tech-editor mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-editor
>



--
Martijn Wargers - Help Mozilla!
http://quality.mozilla.org/
http://wiki.mozilla.org/Mozilla_QA_Community
irc://irc.mozilla.org/qa - /nick mw22
_______________________________________________
dev-tech-editor mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-editor