Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions ckeditor5_plugins/icon/src/iconconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@

import type { FontAwesomeVersion, FontAwesomeStyle, SelectableOption, CategoryDefinitions, IconName, IconDefinition, IconDefinitionAlt } from './icontypes';
import type { ToolbarConfigItem } from 'ckeditor5/src/core';
import { icons } from 'ckeditor5/src/core';
import objectSizeExtraSmall from '../../../icons/object-size-extra-small.svg';
import objectSizeSmall from '../../../icons/object-size-small.svg';
import objectSizeMedium from '../../../icons/object-size-medium.svg';
import objectSizeLarge from '../../../icons/object-size-large.svg';
import objectSizeFull from '../../../icons/object-size-full.svg';
import objectCenter from '../../../icons/object-center.svg';
import objectLeft from '../../../icons/object-left.svg';
import objectRight from '../../../icons/object-right.svg';

/**
* The options available in `editor.config.get('icon')`.
Expand Down Expand Up @@ -36,21 +42,21 @@ export const sizeOptions: { [key in Size]: SelectableOption; } = {
},
small: {
label: 'Small',
icon: icons.objectSizeSmall,
icon: objectSizeSmall,
className: 'fa-sm'
},
regular: {
label: 'Regular',
icon: icons.objectSizeMedium
icon: objectSizeMedium
},
large: {
label: 'Large',
icon: icons.objectSizeLarge,
icon: objectSizeLarge,
className: 'fa-lg'
},
extraLarge: {
label: 'Extra Large',
icon: icons.objectSizeFull,
icon: objectSizeFull,
className: 'fa-xl',
compatibility: ['6']
},
Expand Down Expand Up @@ -100,16 +106,16 @@ export type AlignmentAttributeDefinition = ModelAttributeDefinition<Alignment, '
export const alignmentOptions: { [key in Alignment]: SelectableOption; } = {
none: {
label: 'With text',
icon: icons.objectCenter
icon: objectCenter
},
left: {
label: 'Pull left',
icon: icons.objectLeft,
icon: objectLeft,
className: 'fa-pull-left'
},
right: {
label: 'Pull right',
icon: icons.objectRight,
icon: objectRight,
className: 'fa-pull-right'
}
};
Expand Down
7 changes: 4 additions & 3 deletions ckeditor5_plugins/icon/src/view/iconpickerform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import type { Locale } from 'ckeditor5/src/utils';
import type { DropdownView, ListDropdownItemDefinition } from 'ckeditor5/src/ui';
import { addListToDropdown, ButtonView, createDropdown, submitHandler, View } from 'ckeditor5/src/ui';
import { UiViewModel as ViewModel } from '../iconshims';
import { icons } from 'ckeditor5/src/core';
import { Collection } from 'ckeditor5/src/utils';
import { faStyleLabels } from '../iconconfig';
import type { FontAwesomeStyle, IconDefinition, IconName } from '../icontypes';
import { createButton } from './viewutils';
import check from '../../../../icons/check.svg';
import cancel from '../../../../icons/cancel.svg';

export default class IconPickerForm extends View {
/**
Expand Down Expand Up @@ -60,12 +61,12 @@ export default class IconPickerForm extends View {
this.styleDropdownItems = new Collection<ListDropdownItemDefinition>();
addListToDropdown(this.styleDropdownView, this.styleDropdownItems);

this.submitButtonView = createButton(locale, t('Insert'), icons.check, 'ck-button-save');
this.submitButtonView = createButton(locale, t('Insert'), check, 'ck-button-save');
// Submit type of the button will trigger the submit event on entire form when clicked
//(see submitHandler() in render() below).
this.submitButtonView.type = 'submit';

this.cancelButtonView = createButton(locale, t('Cancel'), icons.cancel, 'ck-button-cancel');
this.cancelButtonView = createButton(locale, t('Cancel'), cancel, 'ck-button-cancel');
this.cancelButtonView.delegate('execute').to(this, 'cancel');

this.setTemplate({
Expand Down
4 changes: 2 additions & 2 deletions ckeditor5_plugins/icon/src/view/iconpickersearch.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { InputViewInputEvent } from '@ckeditor/ckeditor5-ui/src/input/inputview';
import type { Locale } from 'ckeditor5/src/utils';
import type { ButtonView, InputTextView, ButtonExecuteEvent } from 'ckeditor5/src/ui';
import { icons } from 'ckeditor5/src/core';
import { createLabeledInputText, LabeledFieldView, View } from 'ckeditor5/src/ui';
import HideableView from './hideableview';
import { createButton } from './viewutils';
import cancel from '../../../../icons/cancel.svg';

// cSpell:ignore inputview

Expand Down Expand Up @@ -45,7 +45,7 @@ export default class IconPickerSearch extends View<HTMLFormElement> {
this.searchFieldView.fieldView.on<InputViewInputEvent>('input', () =>
this._search(true, this.searchFieldView.fieldView.element?.value));

this.clearButtonView = createButton(locale, t('Clear search'), icons.cancel, 'ck-button-cancel');
this.clearButtonView = createButton(locale, t('Clear search'), cancel, 'ck-button-cancel');
this.clearButtonView.isVisible = false;
this.clearButtonView.on<ButtonExecuteEvent>('execute', () => {
this._search(false);
Expand Down
1 change: 1 addition & 0 deletions icons/align-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/align-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/align-justify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/align-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/align-middle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/align-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/align-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/cancel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/caption.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/cog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/eraser.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/importexport.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/low-vision.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-full-width.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-inline-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-inline-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-inline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-size-full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-size-large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/object-size-medium.svg
1 change: 1 addition & 0 deletions icons/object-size-small.svg
1 change: 1 addition & 0 deletions icons/paragraph.svg
1 change: 1 addition & 0 deletions icons/pencil.svg
1 change: 1 addition & 0 deletions icons/pilcrow.svg
1 change: 1 addition & 0 deletions icons/plus.svg
1 change: 1 addition & 0 deletions icons/quote.svg
Loading