Menu

Problem applying Styles

Help
2003-06-03
2004-05-25
  • Marc Hüser

    Marc Hüser - 2003-06-03

    Really really nice Editor!

    When I apply a "style" to a marked Text for example, everything is fine but if i want to change it and choose another style it will not be displayed.

    If I look at the source there are as much "span" tags as I choosed and the first "style"  I applied is outside the others.

    Isnt it possible to use only one "span" tag or to add new applied "span" tags outside the older ones ?

     
    • Denis Braet

      Denis Braet - 2003-06-04

      Hi Marc,

      I know the applying of styles isn't optimal yet.  The whole trick is to find out when to apply a new tag, and when to modify an existing one.  Applying new tags outside selected html isn't that easy, as IE has the annoying habit of adding outer tags when selecting an objects innerHTML property.  Thus, if you have text like this:

      <SPAN class=Title>aynHTML</SPAN>

      applying another style to this fragment would result in HTML like this:

      <SPAN class=Title><SPAN class=Subtitle><SPAN class=Title>aynHTML</SPAN></SPAN></SPAN>

      I'll try to find a suitable algorithm to avoid this.

      Regards,

      Denis

       
    • Marc Hüser

      Marc Hüser - 2003-06-04

      Thanks for your reply.
      A possible workaround seems to be marking the text and pressing remove formatting and afterwards applying the new style.

      But the user has to mark the text + span tag and that seems to be a bit "fizzling" for a novice.

       
    • Laurynas

      Laurynas - 2004-05-25

      In my www site are 2 css styles.

      Then i write stiles in index.html:

      <link href="../../fonts.css" rel="stylesheet" type="text/css">
      <link href="../../links.css" rel="stylesheet" type="text/css">

      Second CSS do not working

      Then i write stiles in one row:

      <link href="../../fonts.css" rel="stylesheet" type="text/css"><link href="../../links.css" rel="stylesheet" type="text/css">

      All CSS working

      But i think that in aynHTML editor must be config file.

       

Log in to post a comment.

MongoDB Logo MongoDB