Skip to content

Commit a31752b

Browse files
author
Farzad Hayatbakhsh
committed
Revert "DOC-2598: TINY-11459 Improve the context form placeholder sample code"
This reverts commit d136fa2.
1 parent d136fa2 commit a31752b

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

modules/ROOT/examples/live-demos/context-form/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ tinymce.init({
1818
},
1919
label: 'Link',
2020
predicate: isAnchorElement,
21-
placeholder: 'https://www.example.com',
2221
initValue: () => {
2322
const elm = getAnchorElement();
2423
return !!elm ? elm.href : '';

modules/ROOT/pages/7.6.0-release-notes.adoc

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,6 @@ tinymce.init({
278278
});
279279
----
280280

281-
For more details on the `back` function, see xref:contextform.adoc#formapi[Context Form - ContextFormApi].
282-
283281
=== New `QuickbarInsertImage` command that is executed by the `quickimage` button.
284282
// #TINY-11399
285283

@@ -314,30 +312,26 @@ tinymce.init({
314312

315313
A new `+onSetup+` API has been introduced for context forms, enabling integrators to execute a function when the form is rendered and handle cleanup when it is closed. This enhancement addresses the previous limitation of not being able to detect or trigger actions during the lifecycle of context forms. The `+onSetup+` API streamlines lifecycle management by supporting initialization at form rendering and providing a return function for cleanup, enhancing integration with plugins and applications.
316314

317-
For more details on the `+onSetup+` function, see xref:contextform.adoc#form[Context Form].
315+
For more details, refer to xref:contextform.adoc#form[Context Form].
318316

319317
=== Added placeholder support for context form input fields
320318
// #TINY-11459
321319

322-
A new `placeholder` option has been introduced to the context form API, addressing the need for inline guidance within input fields. This feature enables developers to specify placeholder text that appears inside input fields until the field has a value. By providing contextual hints, this enhancement improves usability and enhances the user experience.
320+
A new `placeholder` option has been introduced to the context form API, addressing the need for inline guidance within input fields. This feature enables developers to specify placeholder text that appears inside input fields until the field is focused or a value is entered. By providing contextual hints, this enhancement improves usability and enhances the user experience.
323321

324322
.Example: Using a placeholder in a context form input field
325323
[source,js]
326324
----
327-
tinymce.init({
328-
selector: 'textarea',
329-
setup: (editor) => {
330-
editor.ui.registry.addContextForm('my-form', {
331-
predicate: () => true,
332-
placeholder: 'Placeholder goes here...',
333-
commands: []
334-
});
325+
editor.ui.registry.addContextForm('upload-url', {
326+
launch: {
327+
type: 'contextformtogglebutton',
328+
icon: 'link',
329+
tooltip: 'Upload from URL'
335330
},
331+
placeholder: 'Enter URL here...', ....
336332
});
337333
----
338334

339-
For more details on the `placeholder` option, see xref:contextform.adoc#form[Context Form].
340-
341335
=== New `+disabled+` option for disabling all user interactions
342336

343337
A new `+disabled+` option has been introduced to {productname} in version {release-version}. This option allows integrators to disable all user interactions with the editor, including cursor placement, content modifications, and UI components. When set to `+true+`, the editor behaves similarly to the readonly mode changes introduced in {productname} 7.4.0 but ensures complete non-interactivity.

modules/ROOT/pages/contextform.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ This relates to the form itself. The form specifications are:
4141
|Name |Details
4242
|`+launch+` |This is the specification for the launching button that can appear in a context toolbar only. It will be either type: `+contextformbutton+` or `+contextformtogglebutton+`, and will be identical to those definitions below except it will *not* have an `+onAction+`.
4343
|`+label+` |This is the label that will appear in the form.
44-
|`+placeholder+` |This specifies placeholder text that appears inside the input field until the field has a value.
4544
|`+initValue+` |This is the initial value the input will have in the form.
4645
|`+predicate+` |This controls when the context toolbar will appear.
4746
|`+position+` |This controls where the context toolbar will appear with regards to the current cursor.

0 commit comments

Comments
 (0)