Changes between Initial Version and Version 1 of Ticket #9964, comment 2


Ignore:
Timestamp:
Jan 20, 2013, 5:19:34 PM (7 years ago)
Author:
Piotrek Koszuliński
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9964, comment 2

    initial v1  
    1 IMO this issue is strongly related to #9829.
     1IMO '''the first part of this issue''' (inserting into editor h1 with inline styles) is strongly related to #9829.
    22
    33I think that font name and size combos do not have to understand all ways of applying a CSS style. They are applying (and understand) CSS style using style definition defined by font_style and that's it - this is a feature that they are.
     
    881. Strip styles that are not allowed. In this case entire h1's style attribute would be removed because any of editor's features doesn't allow font-family and font-size set for this element.
    992. Harder, but cooler way - editor transforms h1 element by wrapping its content with span and moving style attribute there. Now, the content is fully aligned to the editor's features.
     10
     11
     12=== The second part ===
     13
     14Should font family and size combos (but also e.g. bold and italic buttons) reflect font styles applied by this format?
     15
     16{{{
     17config.format_h1 = { element : 'h1', styles : { 'font-family':'arial,helvetica,sans-serif', 'text-align' : 'center', 'font-size' : '20px;', 'font-weight': 'bold' } };
     18}}}
     19
     20MSWord, Libre Office, Google docs do this. However, they are not generating HTML so we should consider if our case isn't different. But for now, this looks like a reasonable feature request.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy