Skip to content

Commit

Permalink
DOC-1928: Update config options part 2 (F-M)
Browse files Browse the repository at this point in the history
  • Loading branch information
FarzadHayat committed Dec 20, 2024
1 parent 7dd3581 commit 4fb435c
Show file tree
Hide file tree
Showing 94 changed files with 224 additions and 122 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tinymce.init({

=== Example: using `+a11ychecker_filter_issue+` to filter images with empty alternative text from the Accessibility Checker I1 rule

The callback function in the following example will only return `+false+` for any issues with `'I1'` as the `+'id'+` image elements with an empty `+'alt+'` attribute, otherwise the issue wont be filtered out. This implementation can be useful as allowing images to have empty alternative text can be another method of applying the `+role="presentation"+` attribute to mark an image as `+decorative+`.
The callback function in the following example will only return `+false+` for any issues with `'I1'` as the `+'id'+` image elements with an empty `+'alt+'` attribute, otherwise the issue won't be filtered out. This implementation can be useful as allowing images to have empty alternative text can be another method of applying the `+role="presentation"+` attribute to mark an image as `+decorative+`.

[source,js]
----
Expand Down
34 changes: 18 additions & 16 deletions modules/ROOT/partials/configuration/advtable_value_series.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ Each top-level properties of the `advtable_value_series` object are used as the

[cols="1,2,1,4",options="header"]
|===
|Name |Value |Requirement |Description
|title |`+String+` |Required |The text shown in the UI for the series.
|update |`+boolean+` |Optional |default: `+false+` - When `+true+`, the series values will be updated when changes are made to the table.
|resizable |`+boolean+` |Optional |default: `+true+` - When `+true+`, table cells containing the series values can be resized using a mouse or touch device.
|generator |`+(info: GeneratorInfo, rowIndex: number, columnIndex: number) => GeneratorResult+` |Required |For details on creating a value series generator, see: xref:advtable.adoc#creating-a-value-series-generator[Creating a value series generator].
| Name | Value | Requirement | Description
| title | `+String+` | Required | The text shown in the UI for the series.
| update | `+Boolean+` | Optional | default: `+false+` - When `+true+`, the series values will be updated when changes are made to the table.
| resizable | `+Boolean+` | Optional | default: `+true+` - When `+true+`, table cells containing the series values can be resized using a mouse or touch device.
| generator | `+(info: GeneratorInfo, rowIndex: number, columnIndex: number) => GeneratorResult+` | Required | For details on creating a value series generator, see: xref:advtable.adoc#creating-a-value-series-generator[Creating a value series generator].
|===


[[creating-a-value-series-generator]]
==== Creating a value series generator

Expand All @@ -69,13 +70,13 @@ An object with the following properties is passed to the generator callback func

[cols="1,2,4",options="header"]
|===
|Name |Value |Description
|sectionType |`+'thead'+`, `+'tbody'+` or `+'tfoot'+` |The section of the table cell.
|cellType |`+'td'+` or `+'th'+` |The type of the table cell.
|getRowType |`+() => 'header' \| 'body' \| 'footer'+` | A function that returns the type of row the table cell is part of. A 'header' row is either a row that is part of a `thead` section or contains all `th` cells.
|classes |`+string[]+` |The classes present on the table cell.
|direction |`+'row'+` or `+'column'+` |The direction of the generator.
|prev |`+GeneratorResult+` |The generator result from the previous iteration.
| Name | Value | Description
| sectionType | `+'thead'+`, `+'tbody'+` or `+'tfoot'+` | The section of the table cell.
| cellType | `+'td'+` or `+'th'+` | The type of the table cell.
| getRowType | `+() => 'header' \| 'body' \| 'footer'+` | A function that returns the type of row the table cell is part of. A 'header' row is either a row that is part of a `thead` section or contains all `th` cells.
| classes | `+Array+` of `+Strings+` | The classes present on the table cell.
| direction | `+'row'+` or `+'column'+` | The direction of the generator.
| prev | `+GeneratorResult+` | The generator result from the previous iteration.
|===

[[generatorresult]]
Expand All @@ -85,12 +86,13 @@ The generator callback function should return an object with the following prope

[cols="1,1,1,4",options="header"]
|===
|Name |Value |Requirement |Description
|classes |`+string[]+` |Optional |The classes to be applied to the table cell.
|attributes |`+Object+` |Optional |The attributes to be applied to the table cell. The `+attributes+` should be provided as an object where each key is an attribute and each value is of type `+String+`, `+boolean+`, `+number+`, or `+null+`. A value of `+null+` for an attribute will remove the attribute from the table cell.
|value |`+String+`, `+number+` or `+undefined+` |Optional |The value of the table cell. If the value is `+undefined+`, the editor will use the previous value of the table cell.
| Name | Value | Requirement | Description
| classes | `+Array+` of `+Strings+` | Optional | The classes to be applied to the table cell.
| attributes | `+Object+` | Optional | The attributes to be applied to the table cell. The `+attributes+` should be provided as an object where each key is an attribute and each value is of type `+String+`, `+Boolean+`, `+Number+`, or `+null+`. A value of `+null+` for an attribute will remove the attribute from the table cell.
| value | `+String+`, `+Number+` or `+undefined+` | Optional | The value of the table cell. If the value is `+undefined+`, the editor will use the previous value of the table cell.
|===


=== Example: using `+advtable_value_series+`

[source,js]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/partials/configuration/anchor_bottom.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[anchor_bottom]]
== `anchor_bottom`

Lets you specify a custom name for the bottom anchor in the url type ahead drop down. To disable the bottom anchor from the drop down set it `+false+`.
Lets you specify a custom name for the bottom anchor in the URL type ahead drop down. To disable the bottom anchor from the drop down set it `+false+`.

*Type:* `+String+` or `+false+`

Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/partials/configuration/anchor_top.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[anchor_top]]
== `anchor_top`

Lets you specify a custom name for the top anchor in the url type ahead drop down. To disable the to anchor from the drop down set it `+false+`.
Lets you specify a custom name for the top anchor in the URL type ahead drop down. To disable the to anchor from the drop down set it `+false+`.

*Type:* `+String+` or `+false+`

Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/partials/configuration/br_in_pre.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[br_in_pre]]
== `+br_in_pre+`

This option allows you to disable {productname}'s default behavior when pressing the enter key within a `+pre+` tag. By default, pressing enter within a `+pre+` tag produces a `+br+` tag at the insertion point. For example:
This option allows you to disable {productname}'s default behavior when pressing the kbd:[Enter] key within a `+pre+` tag. By default, pressing kbd:[Enter] within a `+pre+` tag produces a `+br+` tag at the insertion point. For example:

`+<pre>This is inside<br>a pre tag.</pre>+`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The recommended method for updating content in an `+iframe+` component is:
onAction: (api) => api.setData({ myiframe: 'new content' })
----

. This updates the iframe to contain the string `'new content'`. This text can be any valid html.
. This updates the iframe to contain the string `'new content'`. This text can be any valid HTML.

. `onAction` is a callback defined in the dialog spec. It is called when a button within the dialog `body` is triggered.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ As of {productname} 7.5.0, the default value of the `exportword_converter_option
.**Default value:**
[source,js]
----
exportword_converter_options: {
{
document: {
size: 'letter'
}
Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/configuration/file_picker_callback.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ It should be noted, that we only provide a hook. It is up to you to implement sp

*Type:* `+Function+`

*Default value:* `+undefined+`

NOTE: The following example demonstrates how you can use `+file_picker_callback+` API, but doesn't pick any real files. Check the xref:interactive-example[Interactive example] for a more functional example.

=== Example: using `+file_picker_callback+`
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/partials/configuration/filetypes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include::partial$plugins/tinydrive-filetypeslist.adoc[]

For example: If the application is using {cloudfilemanager} to insert images, then set `+['image']+` in the file types array.

*Type:* `+Array+`
*Type:* `+Array+` of `+Strings+`

=== Interactive example: Using `+filetypes+` to restrict {cloudfilemanager} to image formats

Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/partials/configuration/fix_list_elements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This invalid list:
<ol>
<li>b</li>
<li>c</li>
</ol>
<li>e</li>
</ol>
<li>e</li>
</ol>
----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Use this option to render the inline toolbar into a fixed positioned HTML elemen

*Type:* `+String+`

*Default value:* `+'undefined'+`

=== Example: using `+fixed_toolbar_container+`

This example takes a CSS 3 selector named `+'#mytoolbar'+` and renders any inline toolbars into this element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ include::partial$misc/admon-inline-only.adoc[]

Use this option to render the inline toolbar into a fixed-positioned HTML element by passing a `+HTMLElement+` directly to the option. This option is similar to the xref:menus-configuration-options.adoc#fixed_toolbar_container[`+fixed_toolbar_container+` option], which accepts a CSS selector.

IMPORTANT: `+fixed_toolbar_container+` has precedence over `+fixed_toolbar_container_target+`, so in order for `+fixed_toolbar_container_target+` to work, do not use the `+fixed_toolbar_container+` option.
[IMPORTANT]
====
`+fixed_toolbar_container+` has precedence over `+fixed_toolbar_container_target+`, so in order for `+fixed_toolbar_container_target+` to work, do not use the `+fixed_toolbar_container+` option.
====

*Type:* `+HTMLElement+`

*Default value:* `+undefined+`

=== Example: using `+fixed_toolbar_container_target+`

[source,js]
Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/partials/configuration/font_css.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Font CSS files should only contain CSS for specifying custom fonts using the `+@

NOTE: To allow users to apply the fonts added though `+font_css+`, update the fonts list using the xref:user-formatting-options.adoc#font_family_formats[`+font_family_formats+` option].

*Type:* `+String+`, `+Array+`
*Type:* `+String+`, `+Array+` of `+Strings+`

*Default value:* `+[]+`

NOTE: This option is intended for use with {productname}'s classic mode, as the editable area is sandboxed within an iframe. For inline mode editors, relevant font CSS files should be loaded as part of the webpage {productname} is rendered in, not using the `+font_css+` option.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[[font_size_input_default_unit]]
== `+font_size_input_default_unit+`

This option sets the default unit of measure for typeface sizes as input in, for example, the `xref:available-toolbar-buttons.adoc#the-core-toolbar-buttons[fontsizeinput]` toolbar buttons text-entry field.
This option sets the default unit of measure for typeface sizes as input in, for example, the `xref:available-toolbar-buttons.adoc#the-core-toolbar-buttons[fontsizeinput]` toolbar button's text-entry field.

Numbers entered in the `fontsizeinput` toolbar without a qualifying unit of measure will be calculated using the unit of measure set.

*Type:* `+String+`

*Default value:* `+pt+`

*Possible values:* `+pt+`, `+px+`, `+em+`, `+cm+`, `+mm+`

*Default value:* `+pt+`

NOTE: If `font_size_input_default_unit` is set to an invalid value (ie, any string other than one of the *possible values* listed above), the setting is ignored. In such a case, numbers entered in the `fontsizeinput` toolbar without a qualifying unit of measure are also ignored.


Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/partials/configuration/forced_root_block.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

This option enables you to adjust the default block element used to wrap non block elements and text nodes. For example `+<strong>something</strong>+` will result in output like: `+<p><strong>something</strong></p>+`. This option cannot be disabled.

To avoid block elements in content, use the xref:content-behavior-options.adoc#newline_behavior[newline_behavior] setting to change what happens when enter is pressed.
To avoid block elements in content, use the xref:content-behavior-options.adoc#newline_behavior[newline_behavior] setting to change what happens when kbd:[Enter] is pressed.

WARNING: Not using `+p+` elements as the root block will impair the functionality of the editor.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This option enables you specify attributes for the xref:content-filtering.adoc#f

*Type:* `+Object+`

*Default value:* `+{}+`

=== Example: using `+forced_root_block_attrs+`

[source,js]
Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/configuration/format_empty_lines.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This option allows "inline" formats to be applied to empty lines for multi-line

*Type:* `+Boolean+`

*Possible values:* `+true+`, `+false+`

*Default value:* `+false+`

=== Example: using `+format_empty_lines+`
Expand Down
10 changes: 9 additions & 1 deletion modules/ROOT/partials/configuration/formats.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ Makes sure that the format is not merged with other wrappers having the same for

*Type:* `+Boolean+`

*Possible values:* `+true+`, `+false+`

*Default value:* `+false+`

===== Example: using `+exact+` parameter
Expand All @@ -256,6 +258,8 @@ States that the format is a container format for block elements. For example, a

*Type:* `+Boolean+`

*Possible values:* `+true+`, `+false+`

*Default value:* `+false+`

===== Example: using `+wrapper+`
Expand Down Expand Up @@ -313,7 +317,7 @@ tinymce.init({

This option controls if the selection should expand upwards to the closest matching block element. This can be useful when configuring `+removeformat+` to remove block elements. So if the selection start is at the beginning of a matching block, then that matching block will be included as well. If the end of the selection is at the end of a matching block element then that parent element will be included as well.

So if the selection is from _a_ to _b_ in this html contents `+<h1><b>[a</b></h1><p>b]</p>+` then the _h1_ will be removed even if it's not part of the actual selection.
So if the selection is from _a_ to _b_ in the HTML contents `+<h1><b>[a</b></h1><p>b]</p>+` then the _h1_ will be removed even if it's not part of the actual selection.

*Type:* `+Boolean+`

Expand Down Expand Up @@ -354,6 +358,8 @@ Enables control for removing the child elements of the matching format. This is

*Type:* `+Boolean+`

*Possible values:* `+true+`, `+false+`

*Default value:* `+false+` for `+selector+` formats

===== Example: using `+deep+`
Expand Down Expand Up @@ -392,6 +398,8 @@ After merge:

*Type:* `+Boolean+`

*Possible values:* `+true+`, `+false+`

*Default value:* `+true+`

===== Example: using `+merge_siblings+`
Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/partials/configuration/fullscreen_native.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ tinymce.init({

The `+fullscreen_native+` option has the following limitations. When `+fullscreen_native+` is enabled:

* The Escape keyboard key (Esc) will exit full screen mode. Default editor behavior of the Esc key will be overridden by browser and the Esc key will exit full screen mode instead of closing dialogs, menus, or moving focus from the editor UI to the editor content. This may lead to accessibility issues.
* For Firefox users, the full screen keyboard shortcut (Command+Shift+F or Ctrl+Shift+F) cannot be used to repeatedly toggle the browser-native full screen mode on and off without interacting with the editor between on toggles. If the user does not interact with the editor between off and on toggles, the plugin will fall-back to filling the browser window.
* The kbd:[Esc] key will exit full screen mode. Default editor behavior of the kbd:[Esc] key will be overridden by browser and the kbd:[Esc] key will exit full screen mode instead of closing dialogs, menus, or moving focus from the editor UI to the editor content. This may lead to accessibility issues.
* For Firefox users, the full screen keyboard shortcut (kbd:[Command+Shift+F] or kbd:[Ctrl+Shift+F]) cannot be used to repeatedly toggle the browser-native full screen mode on and off without interacting with the editor between on toggles. If the user does not interact with the editor between off and on toggles, the plugin will fall-back to filling the browser window.
* If the editor is initialized inside an iframe element, full screen mode will only fill the iframe on Firefox.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tinymce.init({

=== Using `+highlight_on_focus+` with custom skins

If a xref:creating-a-skin.adoc[custom skin] is being used, two variables can be updated to match the `+highlight_on_focus+` options appearance with the custom skin.
If a xref:creating-a-skin.adoc[custom skin] is being used, two variables can be updated to match the `+highlight_on_focus+` option's appearance with the custom skin.

The two rules and their default values are:

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/configuration/icons.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ifeval::[{customIconPack} != true]
The *icons* option allows the editor icons to be extended or replaced using an icon pack. For information on creating icon packs, see: xref:creating-an-icon-pack.adoc[Create an icon pack for {productname}].

*Type:* `+String+`

*Default value:* `+''+`
endif::[]

On initialization, {productname} will try to load any icon pack specified by the *icons* option. The icons in the icon pack will be merged with xref:editor-icon-identifiers.adoc[{productname}'s default icons] and icons in the icon pack will overwrite the default icons with the same identifier.
Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/configuration/icons_url.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ endif::[]
ifeval::[{customIconPack} != true]
*Type:* `+String+`

*Default value:* `+''+`

=== Example: using `+icons_url+`

[source,js]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This option allows you to specify the function that will return the HTML embed c

*Type:* `+Function+`

*Default value:* `+undefined+`

=== Example: using `+iframe_template_callback+`

[source,js]
Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/configuration/image_class_list.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This option lets you specify a predefined list of classes to add to an image. It

*Type:* `+Array+`

*Default value:* `+undefined+`

=== Example: using `+image_class_list+`

[source,js]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/partials/configuration/image_list.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

This option lets you specify a predefined list of sources for images. `+image_list+` takes the form of an array containing items to add to a list with a corresponding image. Each item has a `+title+` and a `+value+`.

*Type:* `+false+`, `+String+`, `+Function+` or `+Array+`
*Type:* `+false+`, `+String+`, `+Function+`, or `+Array+` of `+Objects+`

*Default value:* `+false+`

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/configuration/image_proxy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ NOTE: `{proxy_setting_name}` is *not* required when enabling this plugin via xre

*Type:* `+String+`

*Default value:* `+undefined+`

=== Example: using `{proxy_setting_name}`

[source,js,subs="attributes+"]
Expand Down
4 changes: 1 addition & 3 deletions modules/ROOT/partials/configuration/image_toolbar.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

The *quickbars_image_toolbar* option configures the Quick Image toolbar provided by the xref:quickbars.adoc[quickbars plugin]. To change the buttons on the Quick Image toolbar, provide a space-separated string of xref:available-toolbar-buttons.adoc[toolbar button names]. The Quick Image toolbar is intended for image-related buttons, but any xref:available-toolbar-buttons.adoc[{productname} toolbar buttons] or xref:custom-toolbarbuttons.adoc[custom toolbar buttons] are allowed.

To disable the Quick Image toolbar, set `+quickbars_image_toolbar+` to `+false+`.

*Type:* `+String+` or `+false+`
*Type:* `+String+` or `+Boolean+`

*Default value:* `+'alignleft aligncenter alignright'+`

Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/partials/configuration/images_file_types.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ This option configures which image file formats are accepted by the editor. Chan

*Type:* `+String+`

*Default value:* `+'jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp'+`

*Possible values:* A list of valid web image file extensions. For a list of possible values see: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types[MDN Web Docs - Image file type and format guide].

*Default value:* `+'jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp'+`

=== Example: using `+images_file_types+`

[source,js]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This option lets you specify a `+basepath+` to prepend to URLs returned from the

*Type:* `+String+`

*Default value:* `+''+`

=== Example: using `+images_upload_base_path+`

[source,js]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ When this option is not set, {productname} utilizes an `+XMLHttpRequest+` to upl

*Type:* `+Function+`

*Default value:* `+undefined+`

=== Example: using `+images_upload_handler+`

[source,js]
Expand Down
Loading

0 comments on commit 4fb435c

Please sign in to comment.