Skip to content

Commit d93e440

Browse files
Feature/tinymce5update 2 config from url handling to contribute to documentation (#2353)
1 parent daec4f1 commit d93e440

File tree

8 files changed

+23
-16
lines changed

8 files changed

+23
-16
lines changed

modules/ROOT/pages/configure/contributing-to-open-source.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ The {productname} source code is https://github.com/tinymce/tinymce[hosted on Gi
2121

2222
== Contributing to the documentation
2323

24-
If you would like to contribute to {productname}'s documentation, please see our link:../contributing-docs/[contribute to documentation page and style guide].
24+
If you would like to contribute to {productname}'s documentation, please see our xref:configure/contributing-docs.adoc[contribute to documentation page and style guide].

modules/ROOT/partials/configuration/br_in_pre.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33

44
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:
55

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

88
However, when `br_in_pre` is set to `false`, rather than inserting a `br` tag {productname} will split the `pre` tag. For example:
99

10-
`<pre>This is inside </pre>`
11-
`<pre>a pre tag.</pre>`
10+
`<pre>This is inside </pre><pre>a pre tag.</pre>`
1211

1312
NOTE: when set to `false`, `shift+enter` will insert a `br` tag.
1413

modules/ROOT/partials/configuration/convert_urls.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
== convert_urls
1+
[[convert_urls]]
2+
== `convert_urls`
23

3-
This option enables you to control whether {productname} is to be smart and restore URLs to their original values. URLs are automatically converted (messed up) by default because the browser's built-in logic works this way. There is no way to get the real URL unless you store it away. If you set this option to `false` it tries to keep these URLs intact. This option is set to `true` by default, which means URLs are forced to be either *absolute* or *relative* depending on the state of <<relative_urls,relative_urls>>.
4+
This option enables you to control whether {productname} is to be smart and restore URLs to their original values. URLs are automatically converted (messed up) by default because the browser's built-in logic works this way. There is no way to get the real URL unless you store it away. If you set this option to `false` it tries to keep these URLs intact. This option is set to `true` by default, which means URLs are forced to be either *absolute* or *relative* depending on the state of xref:configure/url-handling.adoc#relative_urls[relative_urls].
45

56
*Type:* `Boolean`
67

modules/ROOT/partials/configuration/document_base_url.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
[[document_base_url]]
12
== `document_base_url`
23

34
This option specifies the base URL for all relative URLs in the document. The default value is the directory of the current document. If a value is provided, it must specify a directory (not a document) and must end with a `/`.
45

5-
This option also interacts with the <<relative_urls,relative_urls>>, <<remove_script_host,remove_script_host>>, and <<convert_urls,convert_urls>> options to determine whether {productname} returns relative or absolute URLs. The link:{baseurl}/general-configuration-guide/get-support/[FAQ] contains a thorough description and examples of working with relative and absolute URLs.
6+
This option also interacts with the xref:configure/url-handling.adoc#relative_urls[relative_urls], xref:configure/url-handling.adoc#remove_script_host[remove_script_host], and xref:configure/url-handling.adoc#convert_urls[convert_urls] options to determine whether {productname} returns relative or absolute URLs. The xref:general-configuration-guide/get-support.adoc[FAQ] contains a thorough description and examples of working with relative and absolute URLs.
67

78
*Type:* `String`
89

modules/ROOT/partials/configuration/relative_urls.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
[[relative_urls]]
12
== `relative_urls`
23

34
For URLs with the same domain as the page containing the {productname} editor. If set to:
45

5-
* `true` -- All URLs created in {productname} will be converted to a link relative to the <<document_base_url,`document_base_url`>>.
6+
* `true` -- All URLs created in {productname} will be converted to a link relative to the xref:configure/url-handling.adoc#document_base_url[`document_base_url`].
67
* `false` -- All URLs will be converted to absolute URLs.
78

89
*Type:* `Boolean`

modules/ROOT/partials/configuration/remove_script_host.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
[[remove_script_host]]
12
== `remove_script_host`
23

3-
This option is used if the <<relative_urls,`relative_urls`>> option is set to `false` and only applies to links with the same domain as the <<document_base_url,`document_base_url`>>.
4+
This option is used if the xref:configure/url-handling.adoc#relative_urls[`relative_urls`] option is set to `false` and only applies to links with the same domain as the xref:configure/url-handling.adoc#document_base_url[`document_base_url`].
45

56
If this option is set to `true`, the protocol and host of the `document_base_url` is _excluded_ for relative links.
67

modules/ROOT/partials/configuration/urlconverter_callback.adoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,22 @@ The format of the converter function is: `URLConverter(url, node, on_save)`, whe
99
* on_save is always set to true.
1010
* name = the attribute name that is being set.
1111
12-
This function should return the converted URL as a string. This option is set to an internal {productname} function xref:apis/tinymce.editor.adoc[convertURL()] by default. You may call this function from your extension in order to use the built-in convert options.
12+
This function should return the converted URL as a string. This option is set to an internal {productname} function xref:apis/tinymce.editor.adoc#convertURL[convertURL()] by default. You may call this function from your extension in order to use the built-in convert options.
1313

1414
*Type:* `Javascript Function`
1515

1616
=== Example: Using `urlconverter_callback`
1717

18-
```js
18+
[source, js]
19+
----
1920
tinymce.init({
2021
selector: 'textarea', // change this value according to your HTML
2122
urlconverter_callback: function(url, node, on_save, name) {
2223
// Do some custom URL conversion
2324
url = url.substring(3);
2425
25-
// Return new URL
26-
return url; } }); ```
26+
// Return new URL
27+
return url;
28+
}
29+
});
30+
----

modules/ROOT/partials/misc/url-handling.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
=== Relative URLs
44

5-
This will convert all URLs within the same domain to relative URLs. The URLs will be relative from the <<document_base_url,document_base_url>>.
5+
This will convert all URLs within the same domain to relative URLs. The URLs will be relative from the xref:configure/url-handling.adoc#document_base_url[document_base_url].
66

77
----
88
relative_urls : true,
@@ -13,7 +13,7 @@ Example: `+http://www.example.com/path1/path2/file.htm+` >> `path2/file.htm`
1313

1414
=== Absolute URLs
1515

16-
This will convert all relative URLs to absolute URLs. The URLs will be absolute based on the <<document_base_url,document_base_url>>.
16+
This will convert all relative URLs to absolute URLs. The URLs will be absolute based on the xref:configure/url-handling.adoc#document_base_url[document_base_url].
1717

1818
----
1919
relative_urls : false,
@@ -25,7 +25,7 @@ Example: path2/file.htm >> /path1/path2/file.htm
2525

2626
=== Domain absolute URLs
2727

28-
This will convert all relative URLs to absolute URLs. The URLs will be absolute based on the <<document_base_url,document_base_url>> with domain.
28+
This will convert all relative URLs to absolute URLs. The URLs will be absolute based on the xref:configure/url-handling.adoc#document_base_url[document_base_url] with domain.
2929

3030
----
3131
relative_urls : false,

0 commit comments

Comments
 (0)