Skip to content

Commit

Permalink
Merge pull request #14686 from ckeditor/ck/14675-migration-guide-for-…
Browse files Browse the repository at this point in the history
…changed-placeholder-text-API

Docs: migration guide for changed placeholder API. Closes #14675.
  • Loading branch information
mlewand authored Aug 1, 2023
2 parents 8cd7a4b + 83bad16 commit 08671b3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/updating/update-to-39.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,18 @@ ClassicEditor
}
} )
```

### View element placeholder

Function {@link module:engine/view/placeholder~enablePlaceholder `enablePlaceholder()`} no longer gets placeholder content as a `text` property of `options` argument. To define a value of placeholder you need to specify it as a {@link module:engine/view/placeholder~PlaceholderableElement#placeholder `placeholder` property} of the `element` which is passed into `options` object.

```js
element.placeholder = 'Type something…';

enablePlaceholder( {
view: editingView,
element: element,
isDirectHost: false,
keepOnFocus: true
} );
```

0 comments on commit 08671b3

Please sign in to comment.