Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement font family editing plugin #2276

Closed
jodator opened this issue Nov 29, 2017 · 1 comment · Fixed by ckeditor/ckeditor5-font#5
Closed

Implement font family editing plugin #2276

jodator opened this issue Nov 29, 2017 · 1 comment · Fixed by ckeditor/ckeditor5-font#5
Labels
package:font type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@jodator
Copy link
Contributor

jodator commented Nov 29, 2017

Requirements similar to font size editing plugin in term of output and configuration.

Probably other requirements will be addes if any talks in #2275 will happen.

@jodator jodator changed the title Implement font face editing plugin Implement font family editing plugin Nov 29, 2017
@jodator
Copy link
Contributor Author

jodator commented Dec 17, 2017

Font family configuration we have to define default set of font families.

Full flavor config with ConverterDefinition:

config.fontFamily = {
    items: [
        'default',
        {
            label: 'Arial',
            model: 'arial',
            view: {
                    // Used also to define ui preview in dropdown?
                    styles: {
                        font-family: 'Arial, Helvetica, sans-serif'
                    }
            }
            // others
        }
    ]
}

Shorthand config

It also makes sense to define config just by defining short-hand definition. Taken CKEditor 4 as an example I'd propose something similar:

config.fontFamily = {
	items: [
		'default',
		'Arial, Helvetica, sans-serif',
		'Courier New, Courier, monospace',
		'Trebuchet MS, Helvetica, sans-serif',
		'Verdana, Geneva, sans-serif'
	]
}

it would create full-flavor configuration and will take first font name as label as well as model value.

Defaults

For default values we migth go with something as in CKEditor 4 - but maybe shorter? At least we migth drop Comic Sans there for the best of humanity.

const defaults = [
	'Arial, Helvetica, sans-serif',
	'Courier New, Courier, monospace',
	'Georgia, serif',
	'Lucida Sans Unicode, Lucida Grande, sans-serif',
	'Tahoma, Geneva, sans-serif',
	'Times New Roman, Times, serif',
	'Trebuchet MS, Helvetica, sans-serif',
	'Verdana, Geneva, sans-serif'
]

Also I wonder if we could create a bit more "semantic" shorthand configuration / presets for defining Font Family view with classes.

Another: does pushing default makes sense? shouldn't we always put "default" item in dropdown?

oleq referenced this issue in ckeditor/ckeditor5-font Feb 15, 2018
Feature: The initial font feature implementation. Closes #2. Closes #3. Closes #4.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-font Oct 8, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:font labels Oct 8, 2019
@mlewand mlewand added this to the iteration 14 milestone Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:font type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants