-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Email integration package #17849
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
Closed
Closed
Email integration package #17849
Changes from 48 commits
Commits
Show all changes
159 commits
Select commit
Hold shift + click to select a range
6dd2c46
Init email package.
Mati365 7180d78
Fix import.
Mati365 a60a2df
Simplify table checks construction.
Mati365 012f7d5
Init GHS plugin skeleton.
Mati365 8d22b85
Adjust imports.
Mati365 f28256f
Add basic GHS plugin implementation.
Mati365 75dabc0
Fix GHS testing.
Mati365 3046316
Adjust GHS plugin.
Mati365 ec3fc3d
Minor CR fixes.
Mati365 1d3903a
Add suppress logs function check.
Mati365 c937230
Fix manual tests
Mati365 614059c
Simplify `_validateConfigColorValue`.
Mati365 7cd23a8
More strict testing.
Mati365 d2d8990
Sort deps.
Mati365 d6ce9c9
Improve docs.
Mati365 84dfedb
Rename error codes a bit.
Mati365 85f853c
Docs: warning language review. [skip ci]
godai78 8d66ae0
Update packages/ckeditor5-email/src/emailintegrationconfig.ts
godai78 5cfa581
Update packages/ckeditor5-email/src/emailintegrationutils.ts
godai78 24e3e4c
Update packages/ckeditor5-email/src/emailintegrationutils.ts
godai78 2e850d8
Sorting dependenecies.
godai78 20fda48
Add console info warnings in emptyblock and exportinlinestyles integr…
Mati365 0de872d
Docs: update API links [short flow]
godai78 05e3fd4
Restore warning in export inline styles integration checker.
Mati365 23924ff
Merge remote-tracking branch 'origin' into ck/epic/email-editing
Mati365 dab8242
Add empty block doc section.
Mati365 79b17b1
Docs: minor fixes. [short flow]
godai78 99d8122
Docs: lead in. [short flow]
godai78 609c411
Update packages/ckeditor5-email/docs/features/email.md
godai78 16edc5a
Update packages/ckeditor5-email/src/emailintegrationutils.ts
godai78 f655616
Update packages/ckeditor5-email/src/emailintegrationutils.ts
godai78 fa77ab3
Update packages/ckeditor5-email/src/emailintegrationutils.ts
godai78 64b6622
Update packages/ckeditor5-email/src/integrations/list.ts
godai78 6de45e9
Update packages/ckeditor5-email/tests/manual/emailintegration.md
godai78 15387ea
Update packages/ckeditor5-email/docs/features/email.md
godai78 a72cbb4
Extend the FullPage plugin with ability to render styles from <head> …
pszczesniak 73574cc
Add missing `@module` to `email/index.ts`.
Mati365 f6713a8
Reorder imports.
Mati365 487f903
Added tests for 'allowRenderStylesFromHead' option.
pszczesniak 7f19a9e
Change color warnings descriptions.
Mati365 ed892d6
Split color validation functions.
Mati365 51e6afe
Add missing unit tests for `_logInfo()`.
Mati365 f28f4f9
Check table / font config only when the table / font plugins are pres…
Mati365 3b01c42
Fix typo in docs.
Mati365 9cb494f
Improve inspector attach.
Mati365 f9db1dc
Update packages/ckeditor5-email/docs/_snippets/features/email.js
godai78 3b44877
Added 'sanitizeCss' config option.
pszczesniak 90f005e
Added tests for 'sanitizeCss' option.
pszczesniak 098e1cd
Use editors domParser.
pszczesniak 1caf9aa
Api docs fixes. [skip ci]
pszczesniak b0231e0
Typo fix. [skip ci]
pszczesniak ac40945
Api docs fixes. [skip ci]
pszczesniak 0bef7bb
Docs: related features. [skip ci]
godai78 2df1785
Update of the manual test description. [skip ci]
pszczesniak 540e00c
Fix typo in docs.
Mati365 022812b
Add more unsupported color formats.
Mati365 825fa25
Add `rgba` to unsupported formats.
Mati365 7755161
Fix minor typos in docs.
Mati365 137541f
Remove styles from head of the main document while editor is destroyed.
pszczesniak e8cac27
Removed unnecessary function from tests.
pszczesniak abf83b5
Docs: minor snippet cleanup. [short flow]
godai78 f5eac62
Add `dll:build` to `package.json`.
Mati365 3c2ae8a
Revert webpack config
Mati365 6692cbd
Fix deps.
Mati365 cd396bd
Center the plain table in the output.
mmotyczynska e788e43
Adjust manual test.
mmotyczynska 378d334
Update tests for plain tables.
mmotyczynska b6b8cab
Add test for consuming 'table' class.
mmotyczynska cacbf1e
Normalize imports, apply CR remarks.
Mati365 ca7c113
Check for non-glue plugins in font plugin asseration.
Mati365 e69a4eb
Print `Markdown` as unsupported plugin.
Mati365 0119e0d
Fix email integration sample
Mati365 72c01c2
Review suggestions applied.
pszczesniak eeb4737
Restore `skipComments` option on reinitialization of the data process…
Mati365 6413857
Fixes after review.
pszczesniak ce8cc6a
Merge branch 'ck/epic/email-editing' into ck/13482-render-style-eleme…
pszczesniak d087026
Merge pull request #17889 from ckeditor/ck/17888-plain-table-not-alig…
mmotyczynska 72a5a99
Merge pull request #17880 from ckeditor/ck/13482-render-style-element…
pszczesniak 11d3b64
Merge branch 'master' into ck/epic/email-editing
pszczesniak 6f794d8
Fixed missing comma.
pszczesniak 64b9e8e
Extend guide for Full page HTML feature.
pszczesniak 743d471
Merge branch 'master-it84' into ck/epic/email-editing
Mati365 33c9f1e
Removed property 'parsedDocument' from the 'HtmlPageDataProcessor' to…
pszczesniak c057ee0
Merge pull request #17907 from ckeditor/ck/13482-html-page-data-proce…
niegowski 53a8620
Docs: Proofread the Full page HTML guide.
gorzelinski 91369f7
Merge pull request #17906 from ckeditor/ck/13482-render-style-element…
pszczesniak 1980877
Merge branch 'master-it84' into ck/epic/email-editing
pszczesniak 60b8e89
Drop `Demo` section from email guide as there is no demo.
Mati365 fe19a66
Drop `TODO` in fullpage for now.
Mati365 17fd8d5
Drop more demo links.
Mati365 ac9bfa2
Added link for Full page HTML feature in error code API docs.
pszczesniak 1119b9d
Merge pull request #17916 from ckeditor/ck/13482-extending-api-docs-o…
pszczesniak 098b57f
Warn about missing TableLayout plugin.
mmotyczynska b3b2ee0
Add basic tests for TableLayout for code coverage.
mmotyczynska 3e23e5e
Fix: Small tweaks.
gorzelinski a8fe7df
Docs: Tweak the warn message.
gorzelinski c4c567e
Update method description.
mmotyczynska 153636c
Merge pull request #17920 from ckeditor/ck/warn-about-missing-table-l…
mmotyczynska dc05d9e
Table layout ui.
mmotyczynska 59e0a32
Table layout ui tests.
mmotyczynska 6052679
Add insertTableLayout to menu bar.
mmotyczynska 7d8bdad
Implementation of TableLayout plugin.
pszczesniak f8fdb68
Added tests for insert table layout command.
pszczesniak ceb47f0
Disable toggleTableCaption button for tables that disallow captions.
mmotyczynska 42372be
Extend manual test with more table features.
mmotyczynska 7ea4713
Temporarily modify the implementation of the command (for testing pur…
mmotyczynska a5a6539
Remove unnecessary command option.
mmotyczynska 6b76b4c
Docs: minor fixes. [short flow]
godai78 f68668e
Merge branch 'master-it84' into ck/epic/email-editing
Mati365 0e90fb1
Add table layout to related features in email integration docs. (#17935)
Mati365 eadbf01
Update of the upcast conversion.
pszczesniak 64d562f
Added more tests.
pszczesniak f10bb2b
Add basic clipboard support for table layout editing.
Mati365 6fbb45e
Add clipboard preview to table layout manual.
Mati365 18259c6
Remove clipboard integration logic, add tests.
Mati365 4f017c1
Merge pull request #17939 from ckeditor/ck/table-layout-plugin-clipboard
Mati365 b7707bc
Added Caption to manual test.
pszczesniak f79b914
Override the original table upcast to met table layout conditions.
pszczesniak 86ecec6
Added support for header rows and header columns + tests.
pszczesniak 26b7a34
Added missing type import.
pszczesniak d888ede
Added tests.
pszczesniak 0eecf8e
Merge branch 'master-it84' into ck/epic/email-editing
Mati365 6ac18b8
Added missing test.
pszczesniak 783a788
Fix incorrect automerge in email package `package.json` file.
Mati365 31e6e43
Add missing `ckeditor5-metadata.json`
Mati365 0ede24b
Fix wrong path in `ckeditor5-metadata.js` of email package.
Mati365 11fdb92
Added description to the manual test. [skip ci]
pszczesniak 8c11254
Merge remote-tracking branch 'origin/ck/epic/email-editing' into ck/t…
mmotyczynska 65939e2
Remove unnecessary command params.
mmotyczynska d42ff28
Applied suggested improvements from code review.
pszczesniak 295d2cf
Merge branch 'ck/epic/email-editing' into ck/table-layout-plugin
pszczesniak 8c9235e
Fix for manual test. [skip ci]
pszczesniak 4c1e456
Docs: Refinement of the Plugins guide.
gorzelinski 305a2e0
Update test description.
mmotyczynska 2ae594a
Add url to the mentioned issue. [skip ci]
mmotyczynska d9f726c
Partial fixes after code review.
pszczesniak 261c65c
Merge pull request #17924 from ckeditor/ck/table-layout-ui
mmotyczynska 6d7495f
Added TableColumnResize as required.
pszczesniak bfa35e7
TableWidth upcasting fix.
pszczesniak 1cc0654
Merge branch 'ck/epic/email-editing' into ck/table-layout-plugin.
pszczesniak bad3acb
Fixes after review.
pszczesniak f383923
Restore clipboard handler.
Mati365 ed5fc28
Add missing test.
Mati365 ad97a04
Added postfixer to make sure that all tables gets tableType attribute.
pszczesniak 196716c
Docs: updating guide headers. [short flow]
godai78 cc5087d
Docs: moving features. [skip ci]
godai78 03d3c9e
Extended postfixer to cover all cases.
pszczesniak 019a6f8
Drop email package from `ckeditor5` `package.json`.
Mati365 d9c97d4
Merge branch 'master-it84' into ck/epic/email-editing
Mati365 2f0e4a1
Drop hard typing dependency to `ckeditor-email` package in GHS.
Mati365 fa8c82a
Remove export from `ckeditor5`
Mati365 680f301
Remove `ckeditor5-email` references from GHS.
Mati365 5a05451
Fix module import due to umberto crashes.
Mati365 67a1b07
Simplified the postfixer.
pszczesniak 99ec58e
Small code refactor.
pszczesniak d8b449f
Merge pull request #17931 from ckeditor/ck/table-layout-plugin
pszczesniak 18d14c3
Remove GHS email integration plugin.
Mati365 78aaac4
Add missing `DataFilterRegisterEvent` export.
Mati365 92a30da
Merge branch 'master-it84' into ck/epic/email-editing
Mati365 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,4 @@ | ||
| Changelog | ||
| ========= | ||
|
|
||
| All changes in the package are documented in https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md. |
This file contains hidden or 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,4 @@ | ||
| Contributing | ||
| ======================================== | ||
|
|
||
| See the [official contributors' guide to CKEditor 5](https://ckeditor.com/docs/ckeditor5/latest/framework/contributing/contributing.html) to learn more. |
This file contains hidden or 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,22 @@ | ||
| Software License Agreement | ||
| ========================== | ||
|
|
||
| **CKEditor 5 email feature** (https://github.com/ckeditor/ckeditor5)<br> | ||
Mati365 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Copyright (c) 2003–2025, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved. | ||
|
|
||
| Licensed under a dual-license model, this software is available under: | ||
|
|
||
| * the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html), | ||
| * or commercial license terms from CKSource Holding sp. z o.o. | ||
|
|
||
| For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options). | ||
|
|
||
| Sources of Intellectual Property Included in CKEditor | ||
| ----------------------------------------------------- | ||
|
|
||
| Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission. | ||
|
|
||
| Trademarks | ||
| ---------- | ||
|
|
||
| **CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders. | ||
This file contains hidden or 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,35 @@ | ||
| CKEditor 5 email integration feature | ||
| ======================================== | ||
|
|
||
| [](https://www.npmjs.com/package/@ckeditor/ckeditor5-email) | ||
| [](https://coveralls.io/github/ckeditor/ckeditor5?branch=master) | ||
| [](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master) | ||
|
|
||
| This package implements email integration features for CKEditor 5. It provides basic functionality for handling email content. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| npm install @ckeditor/ckeditor5-email | ||
| ``` | ||
Mati365 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Create free account | ||
|
|
||
| If you want to check full CKEditor 5 capabilities, sign up for a [free non-commitment 14-day trial](https://portal.ckeditor.com/checkout?plan=free). | ||
|
|
||
| ## Demo | ||
|
|
||
| Check out the [demo in the font feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/email.html#demo). | ||
Mati365 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Documentation | ||
|
|
||
| See the [`@ckeditor/ckeditor5-email` package](https://ckeditor.com/docs/ckeditor5/latest/api/email.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/). | ||
|
|
||
| ## License | ||
|
|
||
| Licensed under a dual-license model, this software is available under: | ||
|
|
||
| * the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html), | ||
| * or commercial license terms from CKSource Holding sp. z o.o. | ||
|
|
||
| For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options). | ||
1 change: 1 addition & 0 deletions
1
packages/ckeditor5-email/docs/_snippets/features/build-email-source.html
This file contains hidden or 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 @@ | ||
| <script src="https://cdn.ckbox.io/ckbox/latest/ckbox.js"></script> |
20 changes: 20 additions & 0 deletions
20
packages/ckeditor5-email/docs/_snippets/features/build-email-source.js
This file contains hidden or 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-2025, CKSource Holding sp. z o.o. All rights reserved. | ||
| * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options | ||
| */ | ||
|
|
||
| /* globals window */ | ||
|
|
||
| import { AutoLink, LinkImage } from '@ckeditor/ckeditor5-link'; | ||
| import { Bookmark } from '@ckeditor/ckeditor5-bookmark'; | ||
| import { CKBox, CKBoxImageEdit } from '@ckeditor/ckeditor5-ckbox'; | ||
| import { PictureEditing, ImageInsert, ImageResize, AutoImage } from '@ckeditor/ckeditor5-image'; | ||
| import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config.js'; | ||
|
|
||
| // Umberto combines all `packages/*/docs` into the `docs/` directory. The import path must be valid after merging all directories. | ||
| import ClassicEditor from '../build-classic.js'; | ||
|
|
||
| window.CKEditorPlugins = { AutoLink, Bookmark, PictureEditing, ImageInsert, ImageResize, AutoImage, LinkImage, CKBox, CKBoxImageEdit }; | ||
|
|
||
| window.ClassicEditor = ClassicEditor; | ||
| window.CS_CONFIG = CS_CONFIG; |
16 changes: 16 additions & 0 deletions
16
packages/ckeditor5-email/docs/_snippets/features/email.html
godai78 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or 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,16 @@ | ||
| <div class="ck ck-content" id="snippet-link"> | ||
| <h3>Valletta</h3> | ||
|
|
||
| <p> | ||
| The capital city of <a href="https://en.wikipedia.org/wiki/Malta">Malta</a> is the top destination | ||
| this summer. It’s home to cutting-edge contemporary architecture, | ||
| <a href="https://en.wikipedia.org/wiki/Baroque">baroque</a> | ||
| masterpieces, delicious local cuisine, and at least 8 months of sun. | ||
| </p> | ||
| <p> | ||
| It’s also a top destination for filmmakers so that you can take a tour through locations familiar | ||
| to you from <a href="https://en.wikipedia.org/wiki/Game_of_Thrones">Game | ||
| of Thrones</a>, <a href="https://en.wikipedia.org/wiki/Gladiator_(2000_film)">Gladiator</a>, | ||
| <a href="https://en.wikipedia.org/wiki/Troy_(film)">Troy</a>, and many more. | ||
| </p> | ||
| </div> |
This file contains hidden or 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,51 @@ | ||
| /** | ||
| * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. | ||
| * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options | ||
| */ | ||
|
|
||
| /* globals console, window, document, ClassicEditor, CKEditorPlugins, CS_CONFIG */ | ||
|
|
||
| import { TOKEN_URL } from '@ckeditor/ckeditor5-ckbox/tests/_utils/ckbox-config.js'; | ||
|
|
||
| ClassicEditor | ||
| .create( document.querySelector( '#snippet-link' ), { | ||
| extraPlugins: [ ...Object.values( CKEditorPlugins ) ], | ||
| cloudServices: CS_CONFIG, | ||
| toolbar: { | ||
| items: [ | ||
| 'undo', 'redo', '|', 'heading', | ||
| '|', 'bold', 'italic', | ||
| '|', 'link', 'bookmark', 'insertImage', 'insertTable', 'mediaEmbed', | ||
| '|', 'bulletedList', 'numberedList', 'outdent', 'indent' | ||
| ] | ||
| }, | ||
| image: { | ||
| toolbar: [ | ||
| 'imageStyle:inline', 'imageStyle:block', 'imageStyle:wrapText', '|', | ||
| 'toggleImageCaption', 'imageTextAlternative', 'ckboxImageEdit' | ||
| ] | ||
| }, | ||
| ui: { | ||
| viewportOffset: { | ||
| top: window.getViewportTopOffsetConfig() | ||
| } | ||
| }, | ||
| ckbox: { | ||
| tokenUrl: TOKEN_URL, | ||
| allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ], | ||
| forceDemoLabel: true | ||
| }, | ||
| licenseKey: 'GPL' | ||
| } ) | ||
| .then( editor => { | ||
| window.editor = editor; | ||
|
|
||
| window.attachTourBalloon( { | ||
| target: window.findToolbarItem( editor.ui.view.toolbar, item => item.label === 'Link' ), | ||
| text: 'Click to create a link.', | ||
| editor | ||
| } ); | ||
| } ) | ||
| .catch( err => { | ||
| console.error( err.stack ); | ||
| } ); |
Mati365 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or 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,36 @@ | ||
| --- | ||
| category: api-reference | ||
| --- | ||
|
|
||
| # CKEditor 5 email feature | ||
|
|
||
| [](https://www.npmjs.com/package/@ckeditor/ckeditor5-link) | ||
|
|
||
| This package implements the email feature for CKEditor 5. It allows for turning the edited content into emails. | ||
|
|
||
| ## Demo | ||
|
|
||
| Check out the demo in the {@link features/email#demo email feature guide}. | ||
|
|
||
| ## Documentation | ||
|
|
||
| See the {@link features/email email feature guide} and the {@link module:email/emailintegration~EmailIntegration} plugin documentation. | ||
|
|
||
| ## Installation | ||
|
|
||
| This package is part of our open-source aggregate package. | ||
|
|
||
| ```bash | ||
| npm install ckeditor5 | ||
| ``` | ||
|
|
||
| ## Contribute | ||
|
|
||
| The source code of this package is available on GitHub in [https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-link](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-link). | ||
|
|
||
| ## External links | ||
|
|
||
| * [`@ckeditor/ckeditor5-link` on npm](https://www.npmjs.com/package/@ckeditor/ckeditor5-link) | ||
| * [`ckeditor/ckeditor5-link` on GitHub](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-link) | ||
| * [Issue tracker](https://github.com/ckeditor/ckeditor5/issues) | ||
| * [Changelog](https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md) |
This file contains hidden or 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,128 @@ | ||
| --- | ||
| title: Email | ||
| meta-title: Email | CKEditor 5 Documentation | ||
| category: features | ||
| modified_at: 2025-01-30 | ||
| --- | ||
|
|
||
| {@snippet features/build-email-source} | ||
|
|
||
| Creating and editing emails is a demanding task that has to overcome various semantic and technical difficulties due to a variety of software solutions and a lack of a standardized approach. The email feature is a set of tools aimed at making the email composition a better and more effective experience. | ||
|
|
||
| ## Demo | ||
|
|
||
| Use the email toolbar button {@icon @ckeditor/ckeditor5-link/theme/icons/link.svg Link}. | ||
|
|
||
| {@snippet features/email} | ||
|
|
||
| <info-box info> | ||
| This demo presents a limited set of features. Visit the {@link examples/builds/full-featured-editor feature-rich editor example} to see more in action. | ||
| </info-box> | ||
|
|
||
| ## Installation | ||
|
|
||
| <info-box info> | ||
| ⚠️ **New import paths** | ||
|
|
||
| Starting with {@link updating/update-to-42 version 42.0.0}, we changed the format of import paths. This guide uses the new, shorter format. Refer to the {@link getting-started/legacy-getting-started/legacy-imports Packages in the legacy setup} guide if you use an older version of CKEditor 5. | ||
| </info-box> | ||
|
|
||
| After {@link getting-started/integrations-cdn/quick-start installing the editor}, add the feature to your plugin list and toolbar configuration: | ||
|
|
||
| <code-switcher> | ||
| ```js | ||
| import { ClassicEditor, EmailIntegration } from 'ckeditor5'; | ||
|
|
||
| ClassicEditor | ||
| .create( document.querySelector( '#editor' ), { | ||
| licenseKey: '<YOUR_LICENSE_KEY>', // Or 'GPL'. | ||
| plugins: [ EmailIntegration, /* ... */ ], | ||
| toolbar: [ 'email', /* ... */ ], //probably not | ||
| link: { | ||
| // Configuration. | ||
| } | ||
| } ) | ||
| .then( /* ... */ ) | ||
| .catch( /* ... */ ); | ||
| ``` | ||
| </code-switcher> | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Empty block plugin | ||
|
|
||
| The {@link module:html-support/emptyblock~EmptyBlock} plugin is recommended for email editing as it helps maintain compatibility with email clients. By default, CKEditor 5 adds ` ` fillers to empty block elements. This can cause inconsistent rendering across email clients and interfere with the CSS styling. | ||
|
|
||
| Here is how empty blocks are handled with and without the plugin: | ||
|
|
||
| ```html | ||
| <!-- Without EmptyBlock plugin --> | ||
| <p class="spacer"> </p> | ||
| <td> </td> | ||
|
|
||
| <!-- With EmptyBlock plugin --> | ||
| <p class="spacer"></p> | ||
| <td></td> | ||
| ``` | ||
|
|
||
| To enable the EmptyBlock plugin, add it to your editor configuration: | ||
|
|
||
| ```js | ||
| import { EmailIntegration, EmptyBlock } from 'ckeditor5'; | ||
|
|
||
| ClassicEditor | ||
| .create( document.querySelector( '#editor' ), { | ||
| plugins: [ EmailIntegration, EmptyBlock, /* ... */ ], | ||
| htmlSupport: { | ||
| preserveEmptyBlocksInEditingView: true | ||
| } | ||
| } ) | ||
| .then( editor => { | ||
| console.log( 'Editor was initialized' ); | ||
| } ) | ||
| .catch( error => { | ||
| console.error( error ); | ||
| } ); | ||
| ``` | ||
|
|
||
| The `preserveEmptyBlocksInEditingView` option determines whether empty blocks should be preserved during editing (true) or only in the final output (false). | ||
|
|
||
| <info-box warning> | ||
| Without the EmptyBlock plugin, email clients may render empty blocks inconsistently. The editor will display a warning in the console if the plugin is not enabled. | ||
| </info-box> | ||
|
|
||
| ### Logs and warnings | ||
|
|
||
| The {@link module:email/emailintegrationconfig~EmailIntegrationConfig} property lets you suppress warnings or log messages about email client compatibility. | ||
|
|
||
| ```js | ||
| ClassicEditor | ||
| .create( editorElement, { | ||
| email: { | ||
| logs: { | ||
| suppressAll: false, | ||
| suppress: [ ... ] | ||
| } | ||
| } | ||
| } ) | ||
| ``` | ||
|
|
||
| ## Related features | ||
|
|
||
| Here are some related CKEditor 5 features that you may find helpful: | ||
| * Export inline styles The export inline styles feature turn all external CSS styles to inline style, providing better compatibility with various email clients. | ||
|
|
||
| ## Common API | ||
|
|
||
| The {@link module:email/emailintegration~EmailIntegration} plugin registers the following components: | ||
|
|
||
| * The {@link module:email/emailintegration~EmailIntegration} component. | ||
| * The {@link module:email/emailintegrationconfig~EmailIntegrationConfig} property. | ||
|
|
||
| <info-box> | ||
| We recommend using the official {@link framework/development-tools/inspector CKEditor 5 inspector} for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more. | ||
| </info-box> | ||
|
|
||
| ## Contribute | ||
|
|
||
| The source code of the feature is available on GitHub at [https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-link](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-link). |
This file contains hidden or 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,58 @@ | ||
| { | ||
| "name": "@ckeditor/ckeditor5-email", | ||
| "version": "0.0.1", | ||
gorzelinski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "Email integration feature for CKEditor 5.", | ||
| "keywords": [ | ||
| "ckeditor", | ||
| "ckeditor5", | ||
| "ckeditor 5", | ||
| "ckeditor5-feature", | ||
| "ckeditor5-plugin", | ||
| "ckeditor5-dll" | ||
| ], | ||
| "type": "module", | ||
| "main": "src/index.ts", | ||
| "dependencies": { | ||
| "ckeditor5": "44.1.0", | ||
| "@ckeditor/ckeditor5-core": "44.1.0", | ||
| "@ckeditor/ckeditor5-font": "44.1.0", | ||
| "@ckeditor/ckeditor5-list": "44.1.0", | ||
| "@ckeditor/ckeditor5-table": "44.1.0", | ||
| "@ckeditor/ckeditor5-utils": "44.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "5.0.4", | ||
| "webpack": "^5.94.0", | ||
| "webpack-cli": "^5.1.4", | ||
| "@ckeditor/ckeditor5-basic-styles": "44.1.0", | ||
| "@ckeditor/ckeditor5-editor-classic": "44.1.0", | ||
| "@ckeditor/ckeditor5-essentials": "44.1.0", | ||
| "@ckeditor/ckeditor5-heading": "44.1.0", | ||
| "@ckeditor/ckeditor5-highlight": "44.1.0", | ||
| "@ckeditor/ckeditor5-image": "44.1.0", | ||
| "@ckeditor/ckeditor5-paragraph": "44.1.0", | ||
| "@ckeditor/ckeditor5-source-editing": "44.1.0" | ||
| }, | ||
| "author": "CKSource (http://cksource.com/)", | ||
| "license": "SEE LICENSE IN LICENSE.md", | ||
| "homepage": "https://ckeditor.com/ckeditor-5", | ||
| "bugs": "https://github.com/ckeditor/ckeditor5/issues", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/ckeditor/ckeditor5.git", | ||
| "directory": "packages/ckeditor5-email" | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
| "lang", | ||
| "src/**/*.js", | ||
| "src/**/*.d.ts", | ||
| "theme", | ||
| "ckeditor5-metadata.json", | ||
| "CHANGELOG.md" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc -p ./tsconfig.json", | ||
| "build:dist": "node ../../scripts/nim/build-package.mjs" | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.