Menu

#42 Other Language windows OS breaks most style formatting

open
Fault (30)
5
2003-10-15
2003-10-15
Anonymous
No

I've been testing on dutch and english versions of the
RTE module and could find no other cause for the fault
to appear. When using a Dutch (Netherlands, NL) version
of windows xp sp1 with IE 6 SP1 the headings can't be
selected, the style sticks with normal the moment you
release the mouse button to select heading 1 for
example. Font selection is possible, but another color is
not.
My first thoughts as to the cause is the different name
of the ActiveX component (renamed by the dutch
version). not sure though

Discussion

  • Austin David France

    Logged In: YES
    user_id=171883

    The RTE does not use an Active X component. It uses
    contenteditable="true" support and the
    document.execCommand() method. I can't see how these
    being the problem.

    Unfortunatly I am not in a position to be able to test multi-
    lingual support as I dont have the resources available to me.

     
  • Austin David France

    Logged In: YES
    user_id=171883

    There is a problem with the use of document.execCommand
    ("...") in that the text passed to this function is localised.
    The editor does not currently handle this.

    Suggest we include localised versions of the execCommand()
    strings in the language file and pre-select the appropriate
    strings during language intialisation.

    There is an alternative method I have seen described but it
    looks quite complication, the laguage strings should suffice.

     
  • dalagora

    dalagora - 2004-10-01

    Logged In: YES
    user_id=1075012

    After spending hours trying to figure out how to make MSDN's
    reference to IOleCommandTarget::Exec work, ... with no
    success,

    Found a (lame but at least solved my problem :) way to find
    out the diferent names used in my system's IE for
    FormatBlock. (same method should work for color selection)

    (locate the function put_styleData() in rte_interface.js, the
    headings and other entrys on styleList array that have null at
    the beggining, should be the ones not working for you)

    open rte.js,
    find the reset() function,
    change this:
    if (!el || el == ctlStyle) selValue(ctlStyle, getStyle());

    to this:
    if (!el || el == ctlStyle) { alert(getStyle()); selValue(ctlStyle,
    getStyle());}

    now, load up some content with these problem tags on the
    editor.. paste this:

    <P>NORMAL</P>
    <H1>H1</H1>
    <H2>H2</H2>
    <H3>H3</H3>
    <H4>H4</H4>
    <H5>H5</H5>
    <H6>H6</H6>
    <ADDRESS>ADDRESS</ADDRESS><PRE>FORMA
    TED</PRE>

    now click on the various bits of formatted text, and the alert
    will report the actual name that works on your system... take
    note of these names...

    now you can go to the function put_styleData() in
    rte_interface.js, and change the names for the proper ones...

    ..or better yet, implement this dinamicaly (in rte_lang.js)
    according to locale settings.. (although i think locale isn't
    quite what should be seached for, but instead, IE language
    version installed on the client system..., any ideas on this?)

    Hope this helps...

     
  • dalagora

    dalagora - 2004-10-01

    Logged In: YES
    user_id=1075012

    use this to paste inside the editor for
    <P>NORMAL</P> <H1>H1</H1> <H2>H2</H2> <H3>H3</H3>
    <H4>H4</H4> <H5>H5</H5> <H6>H6</H6>
    <ADDRESS>ADDRESS</ADDRESS><PRE>FORMATED</PRE>

     

Log in to post a comment.

MongoDB Logo MongoDB