Opened 13 years ago

Last modified 10 years ago

#7530 review_failed New Feature

Support for setting a default font and applying it through inline styles

Reported by: Teresa Monahan Owned by: Garry Yao
Priority: Normal Milestone:
Component: General Version:
Keywords: IBM Cc: Damian, Satya Minnekanti, James Cunningham, lynne_kues@…, irinauru@…

Description

We would like to be able to set a default font for text in the editor. We realise this is currently possible using config.contentsCSS to specify a CSS file which defines the default stylings. However we require the default font styling to be stored within the document instead of in an external CSS file.

For example, if the default font is set to Arial, then the text entered in the editor should be wrapped in a span tag and the font family inline style should be set to arial by default e.g.

<span style="font-family: arial;">sample text...</span>

Would it be possible to implement a config option to specify a default font that will be applied like this to all text in the editor unless the user specifies a different font through the font drop down field? Alternatively could you provide an extension point that we could hook into to apply styling like this to text before it is inserted into the editor?

Note: This request came from a customer and it is a feature that would be benificial in many of our products.

Attachments (1)

7530.patch (3.6 KB) - added by Garry Yao 13 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by Satya Minnekanti

Keywords: IBM added

Changed 13 years ago by Garry Yao

Attachment: 7530.patch added

comment:2 Changed 13 years ago by Garry Yao

Owner: set to Garry Yao
Status: newreview

comment:3 Changed 13 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

This is really that kind of feature that we don't need to have, but that we have people asking for, from time to time.

  • I have a gut feeling that the proposed solution is not the way to go, either for performance and for effectiveness.
  • Much probably, a data processor feature would be enough here. This means that the feature will require the developer to have the compromise of using the same styles in the editor CSS, which I assume is ok.
  • Being this an ugly feature (going against the semantics evangelisation that good part of the web works on), this needs to be a separated and dedicated plugin, which doesn't touch the core.

comment:4 Changed 13 years ago by Garry Yao

Much probably, a data processor feature would be enough here.

Could you leak more brilliance of this idea?

comment:5 Changed 11 years ago by Lynne Kues

Cc: lynne_kues@… added

comment:6 Changed 11 years ago by Lynne Kues

This issue has been raised by our customers and we need a way to have a default font and size applied to new text in the editor by default. We are using the configuration parameters font_defaultLabel and fontSize_defaultLabel. It seems that if these parameters match values that are specified for the font combos, the editor should activate those values (i.e., as if the user selected the values). Or there should be some way other way to set the default values for these combos.

comment:7 Changed 10 years ago by Irina

Cc: irinauru@… added
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy