You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DOC-3209: editor.getContent() now includes indent and entity_encoding properties to control HTML formatting. (#3837)
* DOC-3209: editor.getContent() now includes indent and entity_encoding properties to control HTML formatting.
* Update modules/ROOT/pages/8.1.0-release-notes.adoc
* Update modules/ROOT/pages/8.1.0-release-notes.adoc
Co-authored-by: Shan <[email protected]>
---------
Co-authored-by: Shan <[email protected]>
Copy file name to clipboardExpand all lines: modules/ROOT/pages/8.1.0-release-notes.adoc
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,46 @@ For information on the **Suggested Edits** plugin, see: xref:suggestededits.adoc
204
204
205
205
// CCFR here.
206
206
207
+
=== `editor.getContent()` now includes `indent` and `entity_encoding` properties to control HTML formatting
208
+
// #TINY-12786
209
+
210
+
Previously, when using the {productname} `+getContent+` API, options such as `+indent+` and `+entity_encoding+` could not be overridden during the call. The editor always applied its initial configuration, which limited flexibility when retrieving content. This meant integrators were restricted to the defaults set at initialization, with no way to adjust formatting behavior per call.
211
+
212
+
In {productname} {release-version}, the `+getContent+` API has been enhanced to support per-call overrides for `+indent+` and `+entity_encoding+`. These options can now be specified directly when invoking `+getContent+`, regardless of the editor’s default configuration. This improvement gives developers greater control over output formatting, allowing tailored content retrieval for different use cases.
213
+
214
+
.Example: how to use the `+getContent+` API to retrieve content with different formatting options.
.Example of configuring the editor to use named entity encoding and disable indentation.
236
+
[source,js]
237
+
----
238
+
tinymce.init({
239
+
selector: "textarea",
240
+
entity_encoding: 'named', // or 'numeric' or 'raw'
241
+
indent: false, // or true
242
+
});
243
+
----
244
+
245
+
For more information on the `+getContent+` API, see `xref:apis/tinymce.editor.adoc#getContent[getContent()]`.
246
+
207
247
=== Clicking on a non selectable element when the selection is off screen no longer scrolls to the selection
208
248
// #TINY-12245
209
249
@@ -212,7 +252,6 @@ Previously, and issue was identified where clicking the editor's horizontal scro
212
252
{productname} {release-version} addresses this issue. Now, the editor avoids taking focus when users click elements that are not selectable (such as scrollbars), preventing unintended vertical scrolling.
0 commit comments