@ckeditor/ckeditor5-list 34.0.1 → 35.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +272 -0
- package/LICENSE.md +2 -2
- package/build/list.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/da.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -0
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -0
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -0
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +52 -0
- package/lang/translations/ar.po +25 -25
- package/lang/translations/bg.po +25 -25
- package/lang/translations/bn.po +125 -0
- package/lang/translations/ca.po +125 -0
- package/lang/translations/da.po +24 -24
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +24 -24
- package/lang/translations/fi.po +25 -25
- package/lang/translations/fr.po +5 -5
- package/lang/translations/he.po +24 -24
- package/lang/translations/hi.po +4 -4
- package/lang/translations/hu.po +15 -15
- package/lang/translations/id.po +17 -17
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +25 -25
- package/lang/translations/ko.po +24 -24
- package/lang/translations/lt.po +25 -25
- package/lang/translations/lv.po +24 -24
- package/lang/translations/ms.po +125 -0
- package/lang/translations/nl.po +20 -20
- package/lang/translations/no.po +24 -24
- package/lang/translations/pl.po +24 -24
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +26 -26
- package/lang/translations/ro.po +4 -4
- package/lang/translations/ru.po +13 -13
- package/lang/translations/sv.po +25 -25
- package/lang/translations/th.po +125 -0
- package/lang/translations/tr.po +24 -24
- package/lang/translations/uk.po +17 -17
- package/lang/translations/ur.po +125 -0
- package/lang/translations/vi.po +24 -24
- package/lang/translations/zh-cn.po +4 -4
- package/lang/translations/zh.po +4 -4
- package/package.json +38 -36
- package/src/documentlist/documentlistediting.js +51 -3
- package/src/documentlistproperties/documentlistpropertiesediting.js +46 -7
- package/src/documentlistproperties/documentliststylecommand.js +24 -1
- package/src/documentlistproperties/utils/style.js +53 -20
- package/src/listproperties/listpropertiesui.js +16 -4
- package/src/listproperties.js +36 -2
- package/build/list.js.map +0 -1
|
@@ -34,7 +34,8 @@ import {
|
|
|
34
34
|
isLastBlockOfListItem,
|
|
35
35
|
isSingleListItem,
|
|
36
36
|
getSelectedBlockObject,
|
|
37
|
-
isListItemBlock
|
|
37
|
+
isListItemBlock,
|
|
38
|
+
removeListAttributes
|
|
38
39
|
} from './utils/model';
|
|
39
40
|
import {
|
|
40
41
|
getViewElementIdForListType,
|
|
@@ -116,8 +117,6 @@ export default class DocumentListEditing extends Plugin {
|
|
|
116
117
|
} );
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
model.on( 'insertContent', createModelIndentPasteFixer( model ), { priority: 'high' } );
|
|
120
|
-
|
|
121
120
|
// Register commands.
|
|
122
121
|
editor.commands.add( 'numberedList', new DocumentListCommand( editor, 'numbered' ) );
|
|
123
122
|
editor.commands.add( 'bulletedList', new DocumentListCommand( editor, 'bulleted' ) );
|
|
@@ -134,6 +133,7 @@ export default class DocumentListEditing extends Plugin {
|
|
|
134
133
|
this._setupDeleteIntegration();
|
|
135
134
|
this._setupEnterIntegration();
|
|
136
135
|
this._setupTabIntegration();
|
|
136
|
+
this._setupClipboardIntegration();
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
/**
|
|
@@ -455,6 +455,54 @@ export default class DocumentListEditing extends Plugin {
|
|
|
455
455
|
evt.return = fixListItemIds( listNodes, seenIds, writer ) || evt.return;
|
|
456
456
|
}, { priority: 'high' } );
|
|
457
457
|
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Integrates the feature with the clipboard via {@link module:engine/model/model~Model#insertContent} and
|
|
461
|
+
* {@link module:engine/model/model~Model#getSelectedContent}.
|
|
462
|
+
*
|
|
463
|
+
* @private
|
|
464
|
+
*/
|
|
465
|
+
_setupClipboardIntegration() {
|
|
466
|
+
const model = this.editor.model;
|
|
467
|
+
|
|
468
|
+
this.listenTo( model, 'insertContent', createModelIndentPasteFixer( model ), { priority: 'high' } );
|
|
469
|
+
|
|
470
|
+
// To enhance the UX, the editor should not copy list attributes to the clipboard if the selection
|
|
471
|
+
// started and ended in the same list item.
|
|
472
|
+
//
|
|
473
|
+
// If the selection was enclosed in a single list item, there is a good chance the user did not want it
|
|
474
|
+
// copied as a list item but plain blocks.
|
|
475
|
+
//
|
|
476
|
+
// This avoids pasting orphaned list items instead of paragraphs, for instance, straight into the root.
|
|
477
|
+
//
|
|
478
|
+
// ┌─────────────────────┬───────────────────┐
|
|
479
|
+
// │ Selection │ Clipboard content │
|
|
480
|
+
// ├─────────────────────┼───────────────────┤
|
|
481
|
+
// │ [* <Widget />] │ <Widget /> │
|
|
482
|
+
// ├─────────────────────┼───────────────────┤
|
|
483
|
+
// │ [* Foo] │ Foo │
|
|
484
|
+
// ├─────────────────────┼───────────────────┤
|
|
485
|
+
// │ * Foo [bar] baz │ bar │
|
|
486
|
+
// ├─────────────────────┼───────────────────┤
|
|
487
|
+
// │ * Fo[o │ o │
|
|
488
|
+
// │ ba]r │ ba │
|
|
489
|
+
// ├─────────────────────┼───────────────────┤
|
|
490
|
+
// │ * Fo[o │ * o │
|
|
491
|
+
// │ * ba]r │ * ba │
|
|
492
|
+
// ├─────────────────────┼───────────────────┤
|
|
493
|
+
// │ [* Foo │ * Foo │
|
|
494
|
+
// │ * bar] │ * bar │
|
|
495
|
+
// └─────────────────────┴───────────────────┘
|
|
496
|
+
//
|
|
497
|
+
// See https://github.com/ckeditor/ckeditor5/issues/11608.
|
|
498
|
+
this.listenTo( model, 'getSelectedContent', ( evt, [ selection ] ) => {
|
|
499
|
+
const isSingleListItemSelected = isSingleListItem( Array.from( selection.getSelectedBlocks() ) );
|
|
500
|
+
|
|
501
|
+
if ( isSingleListItemSelected ) {
|
|
502
|
+
model.change( writer => removeListAttributes( Array.from( evt.return.getChildren() ), writer ) );
|
|
503
|
+
}
|
|
504
|
+
} );
|
|
505
|
+
}
|
|
458
506
|
}
|
|
459
507
|
|
|
460
508
|
/**
|
|
@@ -14,7 +14,12 @@ import DocumentListStartCommand from './documentliststartcommand';
|
|
|
14
14
|
import DocumentListStyleCommand from './documentliststylecommand';
|
|
15
15
|
import DocumentListReversedCommand from './documentlistreversedcommand';
|
|
16
16
|
import { listPropertiesUpcastConverter } from './converters';
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
getAllSupportedStyleTypes,
|
|
19
|
+
getListTypeFromListStyleType,
|
|
20
|
+
getListStyleTypeFromTypeAttribute,
|
|
21
|
+
getTypeAttributeFromListStyleType
|
|
22
|
+
} from './utils/style';
|
|
18
23
|
|
|
19
24
|
const DEFAULT_LIST_TYPE = 'default';
|
|
20
25
|
|
|
@@ -221,7 +226,8 @@ export default class DocumentListPropertiesEditing extends Plugin {
|
|
|
221
226
|
// Creates an array of strategies for dealing with enabled listItem attributes.
|
|
222
227
|
//
|
|
223
228
|
// @param {Object} enabledProperties
|
|
224
|
-
// @param {Boolean} enabledProperties.styles
|
|
229
|
+
// @param {Boolean|Object} enabledProperties.styles
|
|
230
|
+
// @param {Boolean} [enabledProperties.styles.useAttribute]
|
|
225
231
|
// @param {Boolean} enabledProperties.reversed
|
|
226
232
|
// @param {Boolean} enabledProperties.startIndex
|
|
227
233
|
// @returns {Array.<module:list/documentlistproperties/documentlistpropertiesediting~AttributeStrategy>}
|
|
@@ -229,13 +235,21 @@ function createAttributeStrategies( enabledProperties ) {
|
|
|
229
235
|
const strategies = [];
|
|
230
236
|
|
|
231
237
|
if ( enabledProperties.styles ) {
|
|
238
|
+
const useAttribute = typeof enabledProperties.styles == 'object' && enabledProperties.styles.useAttribute;
|
|
239
|
+
|
|
232
240
|
strategies.push( {
|
|
233
241
|
attributeName: 'listStyle',
|
|
234
242
|
defaultValue: DEFAULT_LIST_TYPE,
|
|
235
243
|
viewConsumables: { styles: 'list-style-type' },
|
|
236
244
|
|
|
237
245
|
addCommand( editor ) {
|
|
238
|
-
|
|
246
|
+
let supportedTypes = getAllSupportedStyleTypes();
|
|
247
|
+
|
|
248
|
+
if ( useAttribute ) {
|
|
249
|
+
supportedTypes = supportedTypes.filter( styleType => !!getTypeAttributeFromListStyleType( styleType ) );
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
editor.commands.add( 'listStyle', new DocumentListStyleCommand( editor, DEFAULT_LIST_TYPE, supportedTypes ) );
|
|
239
253
|
},
|
|
240
254
|
|
|
241
255
|
appliesToListItem() {
|
|
@@ -258,14 +272,39 @@ function createAttributeStrategies( enabledProperties ) {
|
|
|
258
272
|
|
|
259
273
|
setAttributeOnDowncast( writer, listStyle, element ) {
|
|
260
274
|
if ( listStyle && listStyle !== DEFAULT_LIST_TYPE ) {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
275
|
+
if ( useAttribute ) {
|
|
276
|
+
const value = getTypeAttributeFromListStyleType( listStyle );
|
|
277
|
+
|
|
278
|
+
if ( value ) {
|
|
279
|
+
writer.setAttribute( 'type', value, element );
|
|
280
|
+
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
} else {
|
|
284
|
+
writer.setStyle( 'list-style-type', listStyle, element );
|
|
285
|
+
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
264
288
|
}
|
|
289
|
+
|
|
290
|
+
writer.removeStyle( 'list-style-type', element );
|
|
291
|
+
writer.removeAttribute( 'type', element );
|
|
265
292
|
},
|
|
266
293
|
|
|
267
294
|
getAttributeOnUpcast( listParent ) {
|
|
268
|
-
|
|
295
|
+
const style = listParent.getStyle( 'list-style-type' );
|
|
296
|
+
|
|
297
|
+
if ( style ) {
|
|
298
|
+
return style;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const attribute = listParent.getAttribute( 'type' );
|
|
302
|
+
|
|
303
|
+
if ( attribute ) {
|
|
304
|
+
return getListStyleTypeFromTypeAttribute( attribute );
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return DEFAULT_LIST_TYPE;
|
|
269
308
|
}
|
|
270
309
|
} );
|
|
271
310
|
}
|
|
@@ -29,8 +29,9 @@ export default class DocumentListStyleCommand extends Command {
|
|
|
29
29
|
* @param {module:core/editor/editor~Editor} editor The editor instance.
|
|
30
30
|
* @param {String} defaultType The list type that will be used by default if the value was not specified during
|
|
31
31
|
* the command execution.
|
|
32
|
+
* @param {Array.<String>} [supportedTypes] The list of supported style types by this command.
|
|
32
33
|
*/
|
|
33
|
-
constructor( editor, defaultType ) {
|
|
34
|
+
constructor( editor, defaultType, supportedTypes ) {
|
|
34
35
|
super( editor );
|
|
35
36
|
|
|
36
37
|
/**
|
|
@@ -40,6 +41,14 @@ export default class DocumentListStyleCommand extends Command {
|
|
|
40
41
|
* @member {String}
|
|
41
42
|
*/
|
|
42
43
|
this._defaultType = defaultType;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The list of supported style types by this command.
|
|
47
|
+
*
|
|
48
|
+
* @private
|
|
49
|
+
* @member {Array.<String>|undefined}
|
|
50
|
+
*/
|
|
51
|
+
this._supportedTypes = supportedTypes;
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
/**
|
|
@@ -80,6 +89,20 @@ export default class DocumentListStyleCommand extends Command {
|
|
|
80
89
|
} );
|
|
81
90
|
}
|
|
82
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Checks if the given style type is supported by this plugin.
|
|
94
|
+
*
|
|
95
|
+
* @param {String} value
|
|
96
|
+
* @returns {Boolean}
|
|
97
|
+
*/
|
|
98
|
+
isStyleTypeSupported( value ) {
|
|
99
|
+
if ( !this._supportedTypes ) {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return this._supportedTypes.includes( value );
|
|
104
|
+
}
|
|
105
|
+
|
|
83
106
|
/**
|
|
84
107
|
* Checks the command's {@link #value}.
|
|
85
108
|
*
|
|
@@ -7,21 +7,42 @@
|
|
|
7
7
|
* @module list/documentlistproperties/utils/style
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
10
|
+
const LIST_STYLE_TO_LIST_TYPE = {};
|
|
11
|
+
const LIST_STYLE_TO_TYPE_ATTRIBUTE = {};
|
|
12
|
+
const TYPE_ATTRIBUTE_TO_LIST_STYLE = {};
|
|
13
|
+
|
|
14
|
+
const LIST_STYLE_TYPES = [
|
|
15
|
+
{ listStyle: 'disc', typeAttribute: 'disc', listType: 'bulleted' },
|
|
16
|
+
{ listStyle: 'circle', typeAttribute: 'circle', listType: 'bulleted' },
|
|
17
|
+
{ listStyle: 'square', typeAttribute: 'square', listType: 'bulleted' },
|
|
18
|
+
{ listStyle: 'decimal', typeAttribute: '1', listType: 'numbered' },
|
|
19
|
+
{ listStyle: 'decimal-leading-zero', typeAttribute: null, listType: 'numbered' },
|
|
20
|
+
{ listStyle: 'lower-roman', typeAttribute: 'i', listType: 'numbered' },
|
|
21
|
+
{ listStyle: 'upper-roman', typeAttribute: 'I', listType: 'numbered' },
|
|
22
|
+
{ listStyle: 'lower-alpha', typeAttribute: 'a', listType: 'numbered' },
|
|
23
|
+
{ listStyle: 'upper-alpha', typeAttribute: 'A', listType: 'numbered' },
|
|
24
|
+
{ listStyle: 'lower-latin', typeAttribute: 'a', listType: 'numbered' },
|
|
25
|
+
{ listStyle: 'upper-latin', typeAttribute: 'A', listType: 'numbered' }
|
|
23
26
|
];
|
|
24
27
|
|
|
28
|
+
for ( const { listStyle, typeAttribute, listType } of LIST_STYLE_TYPES ) {
|
|
29
|
+
LIST_STYLE_TO_LIST_TYPE[ listStyle ] = listType;
|
|
30
|
+
LIST_STYLE_TO_TYPE_ATTRIBUTE[ listStyle ] = typeAttribute;
|
|
31
|
+
|
|
32
|
+
if ( typeAttribute ) {
|
|
33
|
+
TYPE_ATTRIBUTE_TO_LIST_STYLE[ typeAttribute ] = listStyle;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Gets all the style types supported by given list type.
|
|
39
|
+
*
|
|
40
|
+
* @returns {Array.<String>}
|
|
41
|
+
*/
|
|
42
|
+
export function getAllSupportedStyleTypes() {
|
|
43
|
+
return LIST_STYLE_TYPES.map( x => x.listStyle );
|
|
44
|
+
}
|
|
45
|
+
|
|
25
46
|
/**
|
|
26
47
|
* Checks whether the given list-style-type is supported by numbered or bulleted list.
|
|
27
48
|
*
|
|
@@ -29,13 +50,25 @@ const NUMBERED_LIST_STYLE_TYPES = [
|
|
|
29
50
|
* @returns {'bulleted'|'numbered'|null}
|
|
30
51
|
*/
|
|
31
52
|
export function getListTypeFromListStyleType( listStyleType ) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
53
|
+
return LIST_STYLE_TO_LIST_TYPE[ listStyleType ] || null;
|
|
54
|
+
}
|
|
35
55
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.
|
|
58
|
+
*
|
|
59
|
+
* @param {String} value
|
|
60
|
+
* @returns {String|null}
|
|
61
|
+
*/
|
|
62
|
+
export function getListStyleTypeFromTypeAttribute( value ) {
|
|
63
|
+
return TYPE_ATTRIBUTE_TO_LIST_STYLE[ value ] || null;
|
|
64
|
+
}
|
|
39
65
|
|
|
40
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.
|
|
68
|
+
*
|
|
69
|
+
* @param {String} value
|
|
70
|
+
* @returns {String|null}
|
|
71
|
+
*/
|
|
72
|
+
export function getTypeAttributeFromListStyleType( value ) {
|
|
73
|
+
return LIST_STYLE_TO_TYPE_ATTRIBUTE[ value ] || null;
|
|
41
74
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Plugin } from 'ckeditor5/src/core';
|
|
11
|
-
import { ButtonView, SplitButtonView, createDropdown } from 'ckeditor5/src/ui';
|
|
11
|
+
import { ButtonView, SplitButtonView, createDropdown, focusChildOnDropdownOpen } from 'ckeditor5/src/ui';
|
|
12
12
|
|
|
13
13
|
import ListPropertiesView from './ui/listpropertiesview';
|
|
14
14
|
|
|
@@ -184,6 +184,15 @@ function getDropdownViewCreator( { editor, parentCommandName, buttonLabel, butto
|
|
|
184
184
|
|
|
185
185
|
dropdownView.panelView.children.add( listPropertiesView );
|
|
186
186
|
|
|
187
|
+
// Accessibility: focus the first active style when opening the dropdown.
|
|
188
|
+
focusChildOnDropdownOpen( dropdownView, () => listPropertiesView.stylesView.children.find( child => child.isOn ) );
|
|
189
|
+
|
|
190
|
+
// Focus the editable after executing the command.
|
|
191
|
+
// Overrides a default behaviour where the focus is moved to the dropdown button (#12125).
|
|
192
|
+
dropdownView.on( 'execute', () => {
|
|
193
|
+
editor.editing.view.focus();
|
|
194
|
+
} );
|
|
195
|
+
|
|
187
196
|
return dropdownView;
|
|
188
197
|
};
|
|
189
198
|
}
|
|
@@ -234,8 +243,6 @@ function getStyleButtonCreator( { editor, listStyleCommand, parentCommandName }
|
|
|
234
243
|
editor.execute( 'listStyle', { type } );
|
|
235
244
|
} );
|
|
236
245
|
}
|
|
237
|
-
|
|
238
|
-
editor.editing.view.focus();
|
|
239
246
|
} );
|
|
240
247
|
|
|
241
248
|
return button;
|
|
@@ -277,7 +284,12 @@ function createListPropertiesView( {
|
|
|
277
284
|
listStyleCommand
|
|
278
285
|
} );
|
|
279
286
|
|
|
280
|
-
|
|
287
|
+
// The command can be ListStyleCommand or DocumentListStyleCommand.
|
|
288
|
+
const isStyleTypeSupported = typeof listStyleCommand.isStyleTypeSupported == 'function' ?
|
|
289
|
+
styleDefinition => listStyleCommand.isStyleTypeSupported( styleDefinition.type ) :
|
|
290
|
+
() => true;
|
|
291
|
+
|
|
292
|
+
styleButtonViews = styleDefinitions.filter( isStyleTypeSupported ).map( styleButtonCreator );
|
|
281
293
|
}
|
|
282
294
|
|
|
283
295
|
const listPropertiesView = new ListPropertiesView( locale, {
|
package/src/listproperties.js
CHANGED
|
@@ -65,10 +65,14 @@ export default class ListProperties extends Plugin {
|
|
|
65
65
|
*/
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* When set, the list style feature will be enabled. It allows changing the `list-style-type` HTML attribute of
|
|
68
|
+
* When set, the list style feature will be enabled. It allows changing the `list-style-type` style or the `type` HTML attribute of a list.
|
|
69
|
+
*
|
|
70
|
+
* **Note**: Styling using the `type` HTML attribute is only available in
|
|
71
|
+
* {@link module:list/documentlistproperties~DocumentListProperties document list properties}
|
|
72
|
+
* ({@link module:list/listproperties~ListPropertiesStyleConfig learn more}).
|
|
69
73
|
*
|
|
70
74
|
* @default true
|
|
71
|
-
* @member {Boolean} module:list/listproperties~ListPropertiesConfig#styles
|
|
75
|
+
* @member {Boolean|module:list/listproperties~ListPropertiesStyleConfig} module:list/listproperties~ListPropertiesConfig#styles
|
|
72
76
|
*/
|
|
73
77
|
|
|
74
78
|
/**
|
|
@@ -99,3 +103,33 @@ export default class ListProperties extends Plugin {
|
|
|
99
103
|
*
|
|
100
104
|
* @member {module:list/listproperties~ListPropertiesConfig} module:list/list~ListConfig#properties
|
|
101
105
|
*/
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @interface ListPropertiesStyleConfig
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* When set `true`, the list style feature will use the `type` attribute of `<ul>` and `<ol>` elements instead of the `list-style-type`
|
|
113
|
+
* style.
|
|
114
|
+
*
|
|
115
|
+
* {
|
|
116
|
+
* list: {
|
|
117
|
+
* properties: {
|
|
118
|
+
* styles: {
|
|
119
|
+
* useAttribute: true
|
|
120
|
+
* },
|
|
121
|
+
*
|
|
122
|
+
* // ...
|
|
123
|
+
* }
|
|
124
|
+
* },
|
|
125
|
+
*
|
|
126
|
+
* // ...
|
|
127
|
+
* }
|
|
128
|
+
*
|
|
129
|
+
* **Note**: Due to limitations of HTML, the "Decimal with leading zero" style is impossible to set using the `type` attribute.
|
|
130
|
+
*
|
|
131
|
+
* **Note**: This configuration works only with {@link module:list/documentlistproperties~DocumentListProperties document list properties}.
|
|
132
|
+
*
|
|
133
|
+
* @default false
|
|
134
|
+
* @member {Boolean} module:list/listproperties~ListPropertiesStyleConfig#useAttribute
|
|
135
|
+
*/
|