-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #550 from ckeditor/editor-integration/react/add-us…
…age-data Feature: Align integration to work with self-service for premium features.
- Loading branch information
Showing
12 changed files
with
227 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { createIntegrationUsageDataPlugin } from '@ckeditor/ckeditor5-integrations-common'; | ||
|
||
/** | ||
* This part of the code is not executed in open-source implementations using a GPL key. | ||
* It only runs when a specific license key is provided. If you are uncertain whether | ||
* this applies to your installation, please contact our support team. | ||
*/ | ||
export const ReactIntegrationUsageDataPlugin = createIntegrationUsageDataPlugin( | ||
'react', | ||
{ | ||
version: __REACT_INTEGRATION_VERSION__, | ||
frameworkVersion: React.version | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
import { appendExtraPluginsToEditorConfig, isCKEditorFreeLicense } from '@ckeditor/ckeditor5-integrations-common'; | ||
import type { EditorConfig } from 'ckeditor5'; | ||
|
||
import { ReactIntegrationUsageDataPlugin } from './ReactIntegrationUsageDataPlugin.js'; | ||
|
||
/** | ||
* Appends all integration plugins to the editor configuration. | ||
* | ||
* @param editorConfig The editor configuration. | ||
* @returns The editor configuration with all integration plugins appended. | ||
*/ | ||
export function appendAllIntegrationPluginsToConfig( editorConfig: EditorConfig ): EditorConfig { | ||
/** | ||
* Do not modify the editor configuration if the editor is using a free license. | ||
*/ | ||
if ( isCKEditorFreeLicense( editorConfig.licenseKey ) ) { | ||
return editorConfig; | ||
} | ||
|
||
return appendExtraPluginsToEditorConfig( editorConfig, [ | ||
/** | ||
* This part of the code is not executed in open-source implementations using a GPL key. | ||
* It only runs when a specific license key is provided. If you are uncertain whether | ||
* this applies to your installation, please contact our support team. | ||
*/ | ||
ReactIntegrationUsageDataPlugin | ||
] ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
declare const __REACT_VERSION__: number; | ||
|
||
declare const __REACT_INTEGRATION_VERSION__: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1225,10 +1225,10 @@ | |
"@ckeditor/ckeditor5-utils" "43.2.0" | ||
ckeditor5 "43.2.0" | ||
|
||
"@ckeditor/ckeditor5-integrations-common@^2.1.0": | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-integrations-common/-/ckeditor5-integrations-common-2.1.0.tgz#5e1423ff764c421d8181a35f73677610038f1fb8" | ||
integrity sha512-vn6qMb36sl6eSCc27dvThk6xISif59MxnxZmRBC440TyP7S9ZcS0ai4yHd5QyaH70ZIe0lhS7DWdLaiKtBggVQ== | ||
"@ckeditor/ckeditor5-integrations-common@^2.2.0": | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-integrations-common/-/ckeditor5-integrations-common-2.2.0.tgz#3eb75e21eddc880c87a675125ec3fcfe0c258847" | ||
integrity sha512-qH68tqgyMibuejo+VAJ+iSH3ZmZweqBEzaawv9hZb4zzSMkBityWBjSc2hKXMtmJgCNsbSK84cyHpa5J/MNyLg== | ||
|
||
"@ckeditor/[email protected]": | ||
version "43.2.0" | ||
|