Changes between Version 1 and Version 2 of Ticket #12403, comment 1


Ignore:
Timestamp:
Sep 5, 2014, 1:58:22 PM (5 years ago)
Author:
Piotrek Koszuliński
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12403, comment 1

    v1 v2  
    11~~Theoretically, the most simple workaround would be to try remove duplicated styles in the new block created on enter. However, this is hard for few reasons - first of all, the code would need to land in enterkey plugin which simply does not handle such things, so it would need to reuse parts of style system... simply wrong.~~ __Edit: see comment:3 why this is a totally incorrect idea.__
    22
    3 Therefore it's better to handle this issue more generally. First thing to notice is that the problem is earlier - when a second span with the same style is created inside the previous one. If we avoid this, we will avoid the problem with enter.
     3Therefore it's better to handle this issue more generally. First thing to notice is that the problem occurs earlier - when a second span with the same style is created inside the previous one. If we avoid this, we will avoid the problem with enter and line breaks.
    44
    55How to do that? My idea is that what we want to do when applying font size for the second time, is removing the currently existing font size style. To do that we could use the removeStyleFromRange feature from style system. So far so good. Now, the problem starts with a styles matching algorithm because font-size:10px is not the same as font-size:30px. So we need a wildcard as a value. This is not supported, but I hope it won't be so hard to implement. When we have this part, we are at home.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy