Skip to content

Commit ddaff89

Browse files
committed
Fixed docs for renaming modules in ckeditor5-fullscreen.
1 parent 068122d commit ddaff89

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

packages/ckeditor5-fullscreen/docs/features/fullscreen.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ Below you will find a customized demo:
168168

169169
This section covers how to provide fullscreen mode integration for other {@link getting-started/setup/editor-types editor types} than classic and decoupled. Please note that only these two editor types are officially supported, so the code snippets below are exemplary and may not solve all technical challenges.
170170

171-
First, you need to create a custom class extending {@link module:fullscreen/handlers/abstracteditorhandler~AbstractEditorHandler `AbstractEditorHandler`}. Besides the optional typing improvements, the most important thing is to implement its custom {@link module:fullscreen/handlers/abstracteditorhandler~AbstractEditorHandler#defaultOnEnter `#defaultOnEnter()`} method. It should move the editor UI elements proper for your editor type to the fullscreen container, preferably using {@link module:fullscreen/handlers/abstracteditorhandler~AbstractEditorHandler#moveToFullscreen `#moveToFullscreen()`} helper - it will assure the elements are moved back in DOM when leaving fullscreen mode.
171+
First, you need to create a custom class extending {@link module:fullscreen/handlers/abstracteditorhandler~FullscreenAbstractEditorHandler `FullscreenAbstractEditorHandler`}. Besides the optional typing improvements, the most important thing is to implement its custom {@link module:fullscreen/handlers/abstracteditorhandler~FullscreenAbstractEditorHandler#defaultOnEnter `#defaultOnEnter()`} method. It should move the editor UI elements proper for your editor type to the fullscreen container, preferably using {@link module:fullscreen/handlers/abstracteditorhandler~FullscreenAbstractEditorHandler#moveToFullscreen `#moveToFullscreen()`} helper - it will assure the elements are moved back in DOM when leaving fullscreen mode.
172172

173173
Then, in the editor's `toggleFullscreen` command, you will need to substitute the {@link module:fullscreen/fullscreencommand~FullscreenCommand#fullscreenHandler `#fullscreenHandler`} property with an instance of your custom class. It can be done by adding a custom plugin that should be later added to the editor configuration (see the full example below).
174174

175175
```ts
176-
import { AbstractEditorHandler, FullscreenEditing } from '@ckeditor/ckeditor5-fullscreen';
176+
import { FullscreenAbstractEditorHandler, FullscreenEditing } from '@ckeditor/ckeditor5-fullscreen';
177177
import { Plugin } from 'ckeditor5/src/core';
178178

179-
class CustomEditorHandler extends AbstractEditorHandler {
179+
class CustomEditorHandler extends FullscreenAbstractEditorHandler {
180180
// It's not mandatory to override `#_editor` property, but that will help TypeScript to properly handle the class.
181181
// Skip if you are not using TS.
182182
protected override readonly _editor: CustomEditorClass;

packages/ckeditor5-fullscreen/src/fullscreencommand.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ export class FullscreenCommand extends Command {
3131
* Specialized class handling the fullscreen mode toggling for a specific editor type.
3232
*
3333
* If you want to add support for a new editor type (for now, only Classic and Decoupled editors are handled),
34-
* create a custom handler that extends `AbstractEditorHandler` and replace `fullscreenHandler` with it after editor initialization:
34+
* create a custom handler that extends `FullscreenAbstractEditorHandler` and replace `fullscreenHandler` with it after
35+
* editor initialization:
3536
*
3637
* ```ts
37-
* // See the details of how to implement a custom handler in the `AbstractEditorHandler` class API docs.
38-
* class CustomEditorHandler extends AbstractEditorHandler {}
38+
* // See the details of how to implement a custom handler in the `FullscreenAbstractEditorHandler` class API docs.
39+
* class CustomEditorHandler extends FullscreenAbstractEditorHandler {}
3940
*
4041
* CustomEditorClass.create( document.querySelector( '#editor' ), {} )
4142
* .then( ( editor ) => {
@@ -57,7 +58,7 @@ export class FullscreenCommand extends Command {
5758

5859
// Choose the appropriate handler based on the editor type.
5960
// Currently only `ClassicEditor` and `DecoupledEditor` are supported. For other editor types, you should create a custom handler
60-
// that extends `AbstractEditorHandler` and replace `fullscreenHandler` with it.
61+
// that extends `FullscreenAbstractEditorHandler` and replace `fullscreenHandler` with it.
6162
if ( isClassicEditor( editor ) ) {
6263
this.fullscreenHandler = new FullscreenClassicEditorHandler( editor );
6364
} else if ( isDecoupledEditor( editor ) ) {

packages/ckeditor5-fullscreen/src/handlers/abstracteditorhandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const DIALOG_OFFSET = 28;
2424
* or if you wish to heavily customize the default behavior.
2525
*
2626
* The only method that is necessary to provide when extending this class is {@link #defaultOnEnter}. However, make sure to
27-
* familiarize yourself with the below full list of actions taken by `AbstractEditorHandler` to understand what is covered by default,
28-
* and what should be provided by you.
27+
* familiarize yourself with the below full list of actions taken by `FullscreenAbstractEditorHandler` to understand
28+
* what is covered by default, and what should be provided by you.
2929
*
3030
* When entering the fullscreen mode, the {@link #enable} method is called. It creates the properly styled container
3131
* and handles the editor features that need it, in the following order:

0 commit comments

Comments
 (0)