Skip to content

Commit

Permalink
DOC-1928: Update config options part 3 (N-R)
Browse files Browse the repository at this point in the history
  • Loading branch information
FarzadHayat committed Dec 21, 2024
1 parent 4fb435c commit 2d858c7
Show file tree
Hide file tree
Showing 31 changed files with 128 additions and 493 deletions.
402 changes: 0 additions & 402 deletions modules/ROOT/partials/configuration/_checklist.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[newdocument_content]]
== `+newdocument_content+`

This option sets the content a new editor contains when the xref:available-menu-items.adoc#the-core-menu-items[File -> New document] menu item is invoked.
This option sets the content a new editor contains when the xref:available-menu-items.adoc#the-core-menu-items[menu:File[New document]] menu item is invoked.

*Type:* `+String+`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[[nonbreaking_force_tab]]
== `+nonbreaking_force_tab+`

This option allows you to force {productname} to insert three `+ +` entities when the user presses the keyboard kbd:[Tab] key.
This option allows you to force {productname} to insert a specified number of `+ +` entities when the user presses the keyboard kbd:[Tab] key.

When set to `+true+`, it will insert three `+ +` entities. When set to a number, it will insert that many `+ +` entities.

It's important to note that this does not change the behavior of the menu and toolbar controls, which will continue to insert a single `+&nbsp+` entity when `+nonbreaking_force_tab+` value is `+true+`.

Expand All @@ -16,9 +18,9 @@ The `+nonbreaking_force_tab+` setting can break the following functionality:
* The `+lists+` plugin uses the kbd:[Tab] key for item indentation.
====

*Type:* `+Boolean+`
*Type:* `+Boolean+` or `+Number+`

*Possible values:* `+true+`, `+false+`
*Possible values:* `+true+`, `+false+`, or any positive number

*Default value:* `+false+`

Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/partials/configuration/noneditable_regexp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ This option is used to specify a regular expression or array of regular expressi

NOTE: If elements are matched by the regular expression, the elements will be replaced with spans. Use xref:noneditable_class[`+noneditable_class+`] for elements.

*Type:* `+String+`
*Type:* `+RegExp+` or `+Array+` of `+RegExp+`

*Default value:* `+[]+`

=== Example: using `+noneditable_regexp+`

Expand Down
20 changes: 5 additions & 15 deletions modules/ROOT/partials/configuration/object_resizing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@

This options allows you to turn on/off the resizing handles on images, tables or media objects. This option is enabled by default and allows you to resize table and images. You can also specify a CSS3 selector of what you want to enable resizing on.

=== Disable all resizing of images/tables
*Type:* `+Boolean+` or `+String+`

*Type:* `+Boolean+`, `+String+`
*Possible values:* `+true+`, `+false+`, or a valid CSS selector

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

*Default value:* `+true+`, or a valid CSS selector
*Default value:* `+'table,img,figure.image,div,video,iframe'+` on desktop, `+false+` on mobile

include::partial$misc/admon-different-default-for-mobile.adoc[]

==== Example: disable object resizing
=== Example: disable all object resizing

[source,js]
----
Expand All @@ -23,15 +21,7 @@ tinymce.init({
});
----

=== Enable resizing on images only

*Type:* `+Boolean+`, `+String+`

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

*Default value:* `+true+`, `+img+`

==== Example: enable object resizing for images
=== Example: enable object resizing for images only

[source,js]
----
Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/configuration/pagebreak_separator.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[pagebreak_separator]]
== `+pagebreak_separator+`

The `+pagebreak_separator+` option allows you to specify the separator string that will be used to identify page breaks in the content.

*Type:* `+String+`

*Default value:* `+'<!-- pagebreak -->'+`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[pagebreak_split_block]]
== `+pagebreak_split_block+`

When enabled this option makes it easier to split block elements with a page break.
When enabled, this option makes it easier to split block elements with a page break.

*Type:* `+Boolean+`

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

This option enables you to set the default state of the `+Paste as text+` menu item under the `+Edit+` menu dropdown. It's disabled by default.
This option enables you to set the default state of the menu:Edit[Paste as text] menu item.

*Type:* `+Boolean+`

Expand Down
6 changes: 5 additions & 1 deletion modules/ROOT/partials/configuration/paste_postprocess.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

ifndef::pluginname[]

This option enables you to modify the pasted content before it gets inserted into the editor, but after it's been parsed into a DOM structure.
This option allows you to modify the pasted content before it gets inserted into the editor, but after it's been parsed into a DOM structure.

*Type:* `+Function+`

*Default value:* `+undefined+`

=== Example: using `+paste_postprocess+`

[source,js]
Expand Down Expand Up @@ -36,6 +38,8 @@ NOTE: The mode 'auto' is used when the content source does not have formatting t

*Type:* `+Function+`

*Default value:* `+undefined+`

=== Example {productname} configuration:

[source,js]
Expand Down
6 changes: 5 additions & 1 deletion modules/ROOT/partials/configuration/paste_preprocess.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

ifndef::pluginname[]

This option enables you to modify the pasted content before it gets inserted into the editor.
This option allows you to modify the pasted content before it gets inserted into the editor.

*Type:* `+Function+`

*Default value:* `+undefined+`

=== Example: using `+paste_preprocess+`

[source,js]
Expand Down Expand Up @@ -36,6 +38,8 @@ NOTE: The mode 'auto' is used when the content source does not have formatting t

*Type:* `+Function+`

*Default value:* `+undefined+`

=== Example {productname} configuration:

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

This option controls how many spaces are used to represent a tab character in HTML when pasting plain text content. By default, when tab characters are pasted they will be converted into 4 sequential space characters.
This option controls how many spaces are used to represent a tab character in HTML when pasting plain text content. By default, when tab characters are pasted they will be converted into 4

*Type:* `+Number+`

Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/partials/configuration/paste_webkit_styles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This option allows you to specify styles you want to keep when pasting in WebKit

*Type:* `+String+`

*Default value:* `+'none'+`
*Possible values:* `+'none'+`, `+'all'+`, or a space-separated list of CSS properties

*Possible values:* `+'none'+`, `+'all'+` or a space separated list of styles
*Default value:* `+'none'+`

=== Example: using `+paste_webkit_styles+`

Expand Down
11 changes: 8 additions & 3 deletions modules/ROOT/partials/configuration/placeholder.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@

This option adds placeholder content that will be shown when the editor is empty.

NOTE: If the editor is initialized on a `+textarea+` element, the placeholder attribute can be used instead.
[NOTE]
====
If the editor is initialized on a `+textarea+` element, the placeholder attribute can be used instead.
====

*Type:* `+String+`

*Default value:* the placeholder on the textarea element

=== Example: using `+placeholder+`

[source,js]
----
tinymce.init({
selector: 'textarea', // change this value according to your HTML
placeholder: 'Type here...'
selector: 'textarea', // change this value according to your HTML
placeholder: 'Type here...'
});
----
8 changes: 5 additions & 3 deletions modules/ROOT/partials/configuration/plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ This option allows configuring which plugins {productname} will attempt to load

The plugins can be provided as either:

* A string of space or comma separated plugin names, such as `+'plugin1 plugin2'+`, or
* A string of space-separated or comma-separated plugin names, such as `+'plugin1 plugin2'+`, or
* An array of plugin names, such as `+[ 'plugin1' , `plugin2' ]+`

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

*Default value:* `+[]+`

=== Example: using `+plugins+` with a string

Expand All @@ -30,4 +32,4 @@ tinymce.init({
});
----

xref:plugins.adoc[Check this documentation page for a list of available plugins].
For a list of available plugins, refer to the xref:plugins.adoc[Plugins] documentation page.
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ When set to `+true+`, Base64 encoded images using a data URI in the copied conte
*Default value:* `+true+`

NOTE: If you configure *_PowerPaste_* to allow local images, you can have {productname} automatically upload Base64 encoded images for conversion back to a standard image as described on the xref:upload-images.adoc[image upload documentation].

=== Example: disable local images
[source,js]
----
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'powerpaste',
powerpaste_allow_local_images: false
});
----
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[[powerpaste_clean_filtered_inline_elements]]
== `+powerpaste_clean_filtered_inline_elements+`

This option allows for configuration of PowerPaste's *"clean"* paste filters for inline elements. These filters are run when `+powerpaste_word_import+` or `+powerpaste_html_import+` are set to `+"clean"+`; or when a user clicks the *"Remove formatting"* button on the paste prompt dialog.
This option allows for configuration of PowerPaste's *"clean"* paste filters for inline elements. These filters are run when `+powerpaste_word_import+` or `+powerpaste_html_import+` are set to `+"clean"+`; or when a user clicks the btn:[Remove formatting] button on the paste prompt dialog.

The list of inline elements that should be removed on paste can be specified by setting `+powerpaste_clean_filtered_inline_elements+` to a comma-separated string of inline element tag names.

*Type:* A comma-separated string or `+Array+`
*Type:* `+Array+` of `+Strings+`, or a comma-separated `+String+`

*Default value:* `+[]+`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This option controls how content pasted from Google Docs is filtered.

*Type:* `+String+` or `+Function+`

*Possible values:* `+'clean'+`, `+'merge'+`, `+'prompt'+`, or a function that returns a `+Promise+` that resolves to `+'clean'+` or `+'merge'+`

*Default value:* `+'prompt'+`

include::partial$plugins/powerpaste_import_types.adoc[]
Expand Down
20 changes: 10 additions & 10 deletions modules/ROOT/partials/configuration/powerpaste_html_import.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,40 @@

This option controls how content pasted from sources other than Microsoft Word and Google Docs are filtered.

*Type:* `+String+`
*Type:* `+String+` or `+Function+`

*Default value:* `+'clean'+`
*Possible values:* `+'clean'+`, `+'merge'+`, `+'prompt'+`, or a function that returns a `+Promise+` that resolves to `+'clean'+` or `+'merge'+`

*Possible values:* `+'clean'+`, `+merge+`, `+prompt+`
*Default value:* `+'clean'+`

What the supported string-based values do:
What the supported string values do:

[cols="1,1"]
[cols="1,4"]
|===
|Value |Behavior

|`+clean+`
|`+'clean'+`
|Preserves the structure of the content such as headings, tables, and lists.

Removes inline styles and classes.

This results in simple content that uses the site's CSS stylesheet while retaining the semantic structure of the original document.

|`+merge+`
|`+'merge'+`
|Preserves the inline formatting and structure of the original document.

Removes invalid and proprietary styles, tags and attributes.

This ensures the HTML is valid while more closely matching the original document formatting.

|`+prompt+`
|Prompts the user to choose between the `+clean+` and `+merge+` options after attempting to paste HTML content.
|`+'prompt'+`
|Prompts the user to choose between the `+'clean'+` and `+'merge'+` options after attempting to paste HTML content.
|===

[NOTE]
.Pasting from a {productname} instance to a {productname} instance
====
Content copied or cut from a {productname} instance and then pasted into a {productname} instance (eg, copyied or cut from one part of a {productname} document and pasted into another place within the same document) is not processed by `+powerpaste_html_import+`.
Content copied or cut from a {productname} instance and then pasted into a {productname} instance (eg, copied or cut from one part of a {productname} document and pasted into another place within the same document) is not processed by `+powerpaste_html_import+`.
In this circumstance, whatever is copied or cut is exactly what is pasted.
====
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This option controls how content pasted from Microsoft Word is filtered.

*Type:* `+String+` or `+Function+`

*Possible values:* `+'clean'+`, `+'merge'+`, `+'prompt'+`, or a function that returns a `+Promise+` that resolves to `+'clean'+` or `+'merge'+`

*Default value:* `+'prompt'+`

include::partial$plugins/powerpaste_import_types.adoc[]
Expand Down
8 changes: 3 additions & 5 deletions modules/ROOT/partials/configuration/preview_styles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ If unset the editor will preview the styles listed in the default value listed b

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

*Default value:* `+'font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow'+`

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

=== Example: using `+preview_styles+`
*Default value:* `+'font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow'+`

No preview of styles:
=== Example: no preview of styles

[source,js]
----
Expand All @@ -24,7 +22,7 @@ tinymce.init({
});
----

Preview of only font-size and color:
=== Example: preview of only font-size and color

[source,js]
----
Expand Down
6 changes: 2 additions & 4 deletions modules/ROOT/partials/configuration/promotion.adoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
[[promotion]]
== `+promotion+`

{productname} 6.2 and later includes the `promotion` option. It controls the presentation or otherwise of a Tiny-specific promotion button.
{productname} 6.2 and later includes the `promotion` option. It controls the presentation or otherwise of a {companyname}-specific promotion button.

*Type:* `+Boolean+`

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

*Default value:* `+true+` in Community self-hosted instances; otherwise `+false+`.

*Possible values:* `+true+`, `+false+`
*Default value:* `+true+` in Community self-hosted instances; `+false+` otherwise

See xref:editor-premium-upgrade-promotion.adoc#premium-upgrade-promotion-defaults[Premium upgrade promotion defaults] for details.

Expand Down
6 changes: 4 additions & 2 deletions modules/ROOT/partials/configuration/protect.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[[protect]]
== `+protect+`

This configuration option enables you to control what contents should be protected from editing while it gets passed into the editor. This could, for example, be control codes in the HTML. It's recommended not to use inline control contents since it breaks the WYSIWYG editing concept, but sometimes they can't be avoided.
This configuration option enables you to control what contents should be protected from editing while it gets passed into the editor. This could, for example, be control codes in the HTML. It's recommended not to use inline content control since it breaks the WYSIWYG editing concept, but sometimes they can't be avoided.

The option takes an array of regular expression that it will match the contents against and these will be invisible while editing.

*Type:* `+Array+`
*Type:* `+Array+` of `+RegExp+`

*Default value:* `+undefined+`

=== Example: using `+protect+`

Expand Down
Loading

0 comments on commit 2d858c7

Please sign in to comment.