Skip to content

Commit

Permalink
Fix deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Dec 5, 2024
1 parent 29fe0a3 commit dba6882
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
4 changes: 2 additions & 2 deletions packages/ckeditor5-bookmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"@ckeditor/ckeditor5-core": "43.3.1",
"@ckeditor/ckeditor5-widget": "43.3.1",
"@ckeditor/ckeditor5-utils": "43.3.1",
"@ckeditor/ckeditor5-ui": "43.3.1",
"@ckeditor/ckeditor5-link": "43.3.1"
"@ckeditor/ckeditor5-ui": "43.3.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "43.3.1",
Expand All @@ -27,6 +26,7 @@
"@ckeditor/ckeditor5-code-block": "43.3.1",
"@ckeditor/ckeditor5-dev-utils": "^45.0.0",
"@ckeditor/ckeditor5-easy-image": "43.3.1",
"@ckeditor/ckeditor5-link": "43.3.1",
"@ckeditor/ckeditor5-editor-classic": "43.3.1",
"@ckeditor/ckeditor5-editor-multi-root": "43.3.1",
"@ckeditor/ckeditor5-engine": "43.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-bookmark/src/bookmarkui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export default class BookmarkUI extends Plugin {
const { plugins } = this.editor;

const t = this.editor.locale.t;
const linksUI = plugins.get( LinkUI );
const linksUI = plugins.get( LinkUI )!;
const bookmarkEditing = plugins.get( BookmarkEditing );

const getItems = () =>
Expand Down
1 change: 0 additions & 1 deletion packages/ckeditor5-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "43.3.1",
"@ckeditor/ckeditor5-block-quote": "43.3.1",
"@ckeditor/ckeditor5-bookmark": "0.0.1",
"@ckeditor/ckeditor5-cloud-services": "43.3.1",
"@ckeditor/ckeditor5-code-block": "43.3.1",
"@ckeditor/ckeditor5-dev-utils": "^45.0.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/ckeditor5-link/src/linkui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import LinkFormView, { type LinkFormValidatorCallback } from './ui/linkformview.
import LinkProviderItemsView from './ui/linkprovideritemsview.js';
import LinkPropertiesView from './ui/linkpropertiesview.js';
import LinkButtonView from './ui/linkbuttonview.js';
import LinkEditing from './linkediting.js';

import type LinkCommand from './linkcommand.js';
import type UnlinkCommand from './unlinkcommand.js';

Expand All @@ -52,7 +54,6 @@ import linkIcon from '../theme/icons/link.svg';
import unlinkIcon from '../theme/icons/unlink.svg';

import '../theme/linktoolbar.css';
import LinkEditing from './linkediting.js';

const VISUAL_SELECTION_MARKER_NAME = 'link-ui';

Expand Down
12 changes: 1 addition & 11 deletions packages/ckeditor5-link/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import type {

import type { Editor } from 'ckeditor5/src/core.js';
import type { LocaleTranslate } from 'ckeditor5/src/utils.js';
import type { BookmarkEditing } from '@ckeditor/ckeditor5-bookmark';

import type {
LinkDecoratorAutomaticDefinition,
Expand Down Expand Up @@ -210,9 +209,7 @@ export function isScrollableToTarget( editor: Editor, link: string | undefined )
return false;
}

const bookmarkEditing: BookmarkEditing = editor.plugins.get( 'BookmarkEditing' );

return !!bookmarkEditing.getElementForBookmarkId( link.slice( 1 ) );
return true;
}

/**
Expand All @@ -223,13 +220,6 @@ export function scrollToTarget( editor: Editor, link: string ): boolean {
return false;
}

const bookmarkEditing: BookmarkEditing = editor.plugins.get( 'BookmarkEditing' )!;
const modelBookmark = bookmarkEditing.getElementForBookmarkId( link.slice( 1 ) );

editor.model.change( writer => {
writer.setSelection( modelBookmark!, 'on' );
} );

editor.editing.view.scrollToTheSelection( {
alignToTop: true,
forceScroll: true
Expand Down

0 comments on commit dba6882

Please sign in to comment.