Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#100 closed New Feature (fixed)

Set editing area styles in fckconfig.js

Reported by: Robby.Klehm@… Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version: FCKeditor 2.4
Keywords: SD-COE Cc: Daniel.Pietsch@…, pkdille, Jean-Marc Libs, Nyloth

Description

This time the default font (after FCKEditor startet) may to be set in

editor/css/fck_editorarea.css: body, td {

font-family: 'Courier New', Arial, Verdana, Sans-Serif; font-size: 12px;

}

In order to integrate FCKEditor without changes in its code we like to set all configurations in one file. Calling one FCKEditor from php we are using the $oFCKeditor->ConfigCustomConfigurationsPath? option overlaying the parameters.

Could you implement an option to set default font within this config file?

Regards

Robby

Change History (10)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: default font setting removed
Milestone: FCKeditor 3.0
Summary: default font configurationSet editing area styles in fckconfig.js

I'm changing this ticket to make it broader. Actually, it would be nice to set any style in the editing area using a configuration option, named "EditorAreaStyles". So one could use it like:

FCKConfig.EditorAreaStyles = 'body, td { font-family: 'Courier New', Arial, Verdana, Sans-Serif; font-size: 12px;} .SomeStyle { color: Red; }' ;

It should not override the FCKConfig.EditorAreaCSS behavior, but add a specific <style> tag right after it.

comment:2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

If there's already the FCKConfig.EditorAreaCSS option, why do we need to add more complexity with another configuration option?

Suggested invalid.

comment:3 in reply to:  2 Changed 17 years ago by Frederico Caldeira Knabben

Replying to alfonsoml:

If there's already the FCKConfig.EditorAreaCSS option, why do we need to add more complexity with another configuration option?

FCKConfig.EditorAreaCSS will still be there. FCKConfig.EditorAreaStyles would be added as a further option, completely optional.

This is not the first time I hear a request like this. Actually, it seams that on many CMSs, users are able to control styles by using a control panel. They are able to edit the styles using a admin page, or even switch between styles. I remember also of cases where each user may have a custom style, or even different styles per page, depending on templates selection and so on. Well, we could imagine hundreds of situations.

Actually I don't expect this config to be used that much in the fckconfig.js file, but it could be largely used inline on pages when creating a editor instance.

Of course, for other users it may has no value, but FCKeditor is well know for its flexibility too (and this feature would not bring a huge impact in the code, I think).

comment:4 Changed 17 years ago by Frederico Caldeira Knabben

Cc: Pascal.KUSTNER@… added
Keywords: SD-COE added
Milestone: FCKeditor 3.0FCKeditor 2.5

comment:5 Changed 17 years ago by Frederico Caldeira Knabben

Cc: jean-marc.libs@… patrice.weber@… added

comment:6 Changed 17 years ago by Frederico Caldeira Knabben

Cc: pkdille Jean-Marc Libs Nyloth added; Pascal.KUSTNER@… jean-marc.libs@… patrice.weber@… removed

comment:7 Changed 17 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:8 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

The "FCKConfig.EditorAreaStyles" configuration entry is implemented in [411] and [412].

Click here for more info about our SVN system.

comment:9 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: closedreopened

This has broken loading the editor in Safari.

It gives an error:

NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
http://localhost/FCKDev/editor/_source/internals/fcktools_gecko.js

pointing to

	var e = documentElement.createElement( "STYLE" ) ;
->	e.innerHTML = cssStyles ;

comment:10 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: reopenedclosed

Thanks for the report.

I've changed the offending line from

e.innerHTML = ...

to

e.appendChild(documentElement.createTextNode(...));

in change set [422]. It should be working fine on Firefox, Opera, Safari and IE now.

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