Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify which files choosen from CKBox are downloadable. #17712

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

Mati365
Copy link
Member

@Mati365 Mati365 commented Jan 3, 2025

Suggested merge commit message (convention)

Feature (ckbox): Allow to specify which files chosen from CKBox are downloadable. Closes #15928

Additional Information

export interface CKBoxConfig {
  // ...

  /**
  * Controls when to enable the download attribute for inserted links.
  *
  * By default, files are downloadable.
  *
  * ```ts
  * const ckboxConfig = {
  *   downloadableFiles: asset => asset.data.extension !== 'pdf'
  * };
  * ```
  */
  downloadableFiles?: ( asset: CKBoxRawAssetDefinition ) => boolean;
};

@Mati365 Mati365 requested review from arkflpc and niegowski January 3, 2025 11:36
@Mati365 Mati365 marked this pull request as draft January 3, 2025 11:52
@Mati365 Mati365 marked this pull request as ready for review January 3, 2025 11:59
@Mati365 Mati365 force-pushed the ck/15928 branch 2 times, most recently from 4c56625 to 351251d Compare January 8, 2025 06:27
gorzelinski
gorzelinski previously approved these changes Jan 17, 2025
@arkflpc arkflpc requested review from mmotyczynska and removed request for niegowski January 21, 2025 10:01
packages/ckeditor5-ckbox/src/ckboxcommand.ts Outdated Show resolved Hide resolved
packages/ckeditor5-ckbox/src/ckboxcommand.ts Outdated Show resolved Hide resolved
packages/ckeditor5-ckbox/src/ckboxcommand.ts Outdated Show resolved Hide resolved
packages/ckeditor5-ckbox/tests/ckboxcommand.js Outdated Show resolved Hide resolved
packages/ckeditor5-ckbox/tests/ckboxcommand.js Outdated Show resolved Hide resolved
packages/ckeditor5-ckbox/tests/ckboxcommand.js Outdated Show resolved Hide resolved
@Mati365 Mati365 requested a review from arkflpc January 21, 2025 10:50
@Mati365
Copy link
Member Author

Mati365 commented Jan 21, 2025

@arkflpc Typos fixed

packages/ckeditor5-ckbox/src/ckboxcommand.ts Outdated Show resolved Hide resolved
packages/ckeditor5-ckbox/src/ckboxcommand.ts Outdated Show resolved Hide resolved
packages/ckeditor5-ckbox/src/ckboxcommand.ts Show resolved Hide resolved
packages/ckeditor5-ckbox/tests/ckboxcommand.js Outdated Show resolved Hide resolved
@Mati365 Mati365 requested a review from mmotyczynska January 22, 2025 06:06
@Mati365
Copy link
Member Author

Mati365 commented Jan 22, 2025

Done @mmotyczynska

@Mati365
Copy link
Member Author

Mati365 commented Jan 22, 2025

@arkflpc can you check?

@Mati365 Mati365 merged commit bf21d48 into master Jan 22, 2025
9 checks passed
@Mati365 Mati365 deleted the ck/15928 branch January 22, 2025 10:39
filipsobol pushed a commit that referenced this pull request Jan 23, 2025
…7712)

Feature (ckbox): Allow to specify which files chosen from CKBox are downloadable. Closes #15928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce an option to open file links embedded in CKEditor via CKBox in a new tab vs. downloading them
4 participants