├── .circleci
└── config.yml
├── .editorconfig
├── .github
├── ISSUE_TEMPLATE.md
└── workflows
│ ├── setup-workflows.yml
│ ├── stalebot.yml
│ └── update-deps.yml
├── .gitignore
├── .nvmrc
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── angular.json
├── e2e
├── protractor.conf.js
├── src
│ ├── app.e2e-spec.ts
│ └── app.po.ts
└── tsconfig.e2e.json
├── package.json
├── scripts
├── build-package.js
├── bump.js
└── test.js
├── src
├── .browserslistrc
├── app
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.ts
│ ├── app.module.ts
│ ├── demo-form
│ │ ├── demo-form.component.css
│ │ ├── demo-form.component.html
│ │ ├── demo-form.component.spec.ts
│ │ └── demo-form.component.ts
│ ├── detachable-component
│ │ ├── detachable-component.component.css
│ │ ├── detachable-component.component.html
│ │ ├── detachable-component.component.spec.ts
│ │ └── detachable-component.component.ts
│ └── simple-usage
│ │ ├── simple-usage.component.css
│ │ ├── simple-usage.component.html
│ │ ├── simple-usage.component.spec.ts
│ │ └── simple-usage.component.ts
├── assets
│ └── .gitkeep
├── ckeditor
│ ├── ckeditor.component.spec.ts
│ ├── ckeditor.component.ts
│ ├── ckeditor.module.spec.ts
│ ├── ckeditor.module.ts
│ ├── ckeditor.ts
│ ├── ng-package.json
│ └── package.json
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── karma.conf.js
├── main.ts
├── polyfills.ts
├── styles.css
├── test.tools.ts
├── test.ts
├── tsconfig.app.json
├── tsconfig.spec.json
└── tslint.json
├── tsconfig.base.json
├── tsconfig.json
└── tslint.json
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2.1
2 | orbs:
3 | browser-tools: circleci/browser-tools@1.5.2
4 |
5 | workflows:
6 | test:
7 | jobs:
8 | - test
9 |
10 | jobs:
11 | test:
12 | docker:
13 | - image: cimg/node:12.22.11-browsers
14 | steps:
15 | - browser-tools/install-browser-tools
16 | - checkout
17 | - run:
18 | name: Install npm
19 | command: npm install --prefix=$HOME/.local install npm@7 -g
20 | - run:
21 | name: Install dependencies
22 | command: npm install
23 | - run:
24 | name: Run tests
25 | command: npm test
26 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = tab
7 | indent_size = 4
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 | end_of_line = lf
11 |
12 | [*.md]
13 | max_line_length = off
14 | trim_trailing_whitespace = false
15 |
16 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Are you reporting a feature request or a bug?
2 |
3 |
10 |
11 | ## Provide detailed reproduction steps (if any)
12 |
13 |
22 |
23 | 1. …
24 | 2. …
25 | 3. …
26 |
27 | ### Expected result
28 |
29 | *What is the expected result of the above steps?*
30 |
31 | ### Actual result
32 |
33 | *What is the actual result of the above steps?*
34 |
35 | ## Other details
36 |
37 | * Browser: …
38 | * OS: …
39 | * Integration version: …
40 | * CKEditor version: …
41 | * Installed CKEditor plugins: …
42 |
--------------------------------------------------------------------------------
/.github/workflows/setup-workflows.yml:
--------------------------------------------------------------------------------
1 | name: Setup and update common workflows
2 |
3 | on:
4 | schedule:
5 | - cron: "0 2 * * *"
6 | workflow_dispatch:
7 | inputs:
8 | config:
9 | description: 'Config'
10 | required: false
11 | default: ''
12 |
13 | jobs:
14 | update:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - name: Checkout default branch
19 | # https://github.com/marketplace/actions/checkout
20 | uses: actions/checkout@v2
21 | with:
22 | token: ${{ secrets.GH_WORKFLOWS_TOKEN }}
23 |
24 | - name: Read config
25 | run: |
26 | CONFIG='{}'
27 | if [[ ! -z '${{ github.event.inputs.config }}' ]]; then
28 | CONFIG='${{ github.event.inputs.config }}'
29 | elif [[ -f "./.github/workflows-config.json" ]]; then
30 | CONFIG=$( jq -c .setupWorkflows './.github/workflows-config.json' )
31 | fi
32 | echo "CONFIG=$CONFIG" >> $GITHUB_ENV
33 | echo "Workflow config: $CONFIG"
34 |
35 | - name: Process config
36 | run: |
37 | AS_PR=$(echo '${{ env.CONFIG }}' | jq -r ".pushAsPullRequest")
38 | if [[ "$AS_PR" == "true" ]]; then
39 | echo "AS_PR=1" >> $GITHUB_ENV
40 | else
41 | echo "AS_PR=0" >> $GITHUB_ENV
42 | fi
43 | BRANCH_SOURCE=$(git rev-parse --abbrev-ref HEAD)
44 | if [[ "$AS_PR" == "true" ]]; then
45 | BRANCH_SOURCE="t/setup-workflows-update_$BRANCH_SOURCE"
46 | fi
47 | echo "BRANCH_SOURCE=$BRANCH_SOURCE" >> $GITHUB_ENV
48 |
49 | - name: Check if update branch already exists
50 | if: env.AS_PR == 1
51 | run: |
52 | if [[ $(git ls-remote --heads | grep ${{ env.BRANCH_SOURCE }} | wc -c) -ne 0 ]]; then
53 | echo "SHOULD_CANCEL=1" >> $GITHUB_ENV
54 | fi
55 |
56 | - name: Cancel build if update branch already exists
57 | if: env.SHOULD_CANCEL == 1
58 | # https://github.com/marketplace/actions/cancel-this-build
59 | uses: andymckay/cancel-action@0.2
60 |
61 | - name: Wait for cancellation
62 | if: env.SHOULD_CANCEL == 1
63 | # https://github.com/marketplace/actions/wait-sleep
64 | uses: jakejarvis/wait-action@master
65 | with:
66 | time: '60s'
67 |
68 | - name: Checkout common workflows repository
69 | # https://github.com/marketplace/actions/checkout
70 | uses: actions/checkout@v2
71 | with:
72 | path: ckeditor4-workflows-common
73 | repository: ckeditor/ckeditor4-workflows-common
74 | ref: master
75 |
76 | - name: Setup workflows directory
77 | run: |
78 | mkdir -p .github/workflows
79 |
80 | - name: Synchronize workflow files
81 | run: |
82 | rsync -a --include='*/' --include='*.yml' --exclude='*' ./ckeditor4-workflows-common/workflows/ ./.github/workflows/
83 | if [[ $(git status ./.github/workflows/ --porcelain) ]]; then
84 | echo "HAS_CHANGES=1" >> $GITHUB_ENV
85 | fi
86 |
87 | - name: Cleanup common workflows artifacts
88 | run: |
89 | rm -rf ckeditor4-workflows-common
90 |
91 | - name: Checkout PR branch
92 | if: env.HAS_CHANGES == 1
93 | run: |
94 | git checkout -b "t/${{ env.BRANCH_SOURCE }}"
95 |
96 | - name: Add changes
97 | if: env.HAS_CHANGES == 1
98 | run: |
99 | git config --local user.email "${{ secrets.GH_BOT_EMAIL }}"
100 | git config --local user.name "${{ secrets.GH_BOT_USERNAME }}"
101 | git add .github/workflows
102 | git commit -m "Update common workflows."
103 |
104 | - name: Push changes
105 | if: env.HAS_CHANGES == 1
106 | # https://github.com/marketplace/actions/github-push
107 | uses: ad-m/github-push-action@master
108 | with:
109 | github_token: ${{ secrets.GH_WORKFLOWS_TOKEN }}
110 | branch: ${{ env.BRANCH_SOURCE }}
111 |
112 | - name: Create PR
113 | if: env.HAS_CHANGES == 1 && env.AS_PR == 1
114 | # https://github.com/marketplace/actions/github-pull-request-action
115 | uses: repo-sync/pull-request@v2
116 | with:
117 | source_branch: "${{ env.BRANCH_SOURCE }}"
118 | destination_branch: "${{ github.ref }}"
119 | pr_title: "Update 'setup-workflows' workflow"
120 | pr_body: "Update 'setup-workflows' workflow."
121 | github_token: ${{ secrets.GITHUB_TOKEN }}
122 |
--------------------------------------------------------------------------------
/.github/workflows/stalebot.yml:
--------------------------------------------------------------------------------
1 | name: Close stale issues and pull requests
2 |
3 | on:
4 | schedule:
5 | - cron: "0 9 * * *"
6 |
7 | jobs:
8 | stale:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/stale@v3
12 | with:
13 | repo-token: ${{ secrets.GITHUB_TOKEN }}
14 | stale-issue-message: "It's been a while since we last heard from you. We are marking this issue as stale due to inactivity. Please provide the requested feedback or the issue will be closed after next 7 days."
15 | stale-pr-message: "It's been a while since we last heard from you. We are marking this pull request as stale due to inactivity. Please provide the requested feedback or the pull request will be closed after next 7 days."
16 | close-issue-message: "There was no activity regarding this issue in the last 14 days. We're closing it for now. Still, feel free to provide us with requested feedback so that we can reopen it."
17 | close-pr-message: "There was no activity regarding this pull request in the last 14 days. We're closing it for now. Still, feel free to provide us with requested feedback so that we can reopen it."
18 | stale-issue-label: 'stale'
19 | stale-pr-label: 'stale'
20 | exempt-issue-labels: 'status:confirmed,status:blocked'
21 | exempt-pr-labels: 'status:blocked'
22 | close-issue-label: 'resolution:expired'
23 | close-pr-label: 'pr:frozen ❄'
24 | remove-stale-when-updated: true
25 | days-before-issue-stale: 7
26 | days-before-pr-stale: 14
27 | days-before-close: 7
28 |
--------------------------------------------------------------------------------
/.github/workflows/update-deps.yml:
--------------------------------------------------------------------------------
1 | name: Update NPM dependencies
2 |
3 | on:
4 | schedule:
5 | - cron: "0 5 1,15 * *"
6 | workflow_dispatch:
7 | inputs:
8 | config:
9 | description: 'Config'
10 | required: false
11 | default: ''
12 |
13 | jobs:
14 | update:
15 | runs-on: ubuntu-latest
16 |
17 | strategy:
18 | matrix:
19 | deps: [production, dev-only]
20 |
21 | steps:
22 | - name: Setup node
23 | # https://github.com/marketplace/actions/setup-node-js-environment
24 | uses: actions/setup-node@v1
25 | with:
26 | node-version: '12'
27 |
28 | - name: Checkout default branch
29 | # https://github.com/marketplace/actions/checkout
30 | uses: actions/checkout@v2
31 |
32 | - name: Read config
33 | run: |
34 | npm i -g npm@7
35 | npm -v
36 | CONFIG='{}'
37 | if [[ ! -z '${{ github.event.inputs.config }}' ]]; then
38 | CONFIG='${{ github.event.inputs.config }}'
39 | elif [[ -f "./.github/workflows-config.json" ]]; then
40 | CONFIG=$( jq -c .updateDeps './.github/workflows-config.json' )
41 | fi
42 | echo "CONFIG=$CONFIG" >> $GITHUB_ENV
43 | echo "Workflow config: $CONFIG"
44 |
45 | - name: Check env variables
46 | run: |
47 | if [[ -z "${{ secrets.GH_BOT_USERNAME }}" ]]; then
48 | echo "Expected 'GH_BOT_USERNAME' secret variable to be set."
49 | exit 1
50 | fi
51 | if [[ -z "${{ secrets.GH_BOT_EMAIL }}" ]]; then
52 | echo "Expected 'GH_BOT_EMAIL' secret variable to be set."
53 | exit 1
54 | fi
55 | BRANCH_TARGET=$(echo '${{ env.CONFIG }}' | jq -r ".targetBranch")
56 | if [[ -z "$BRANCH_TARGET" || "$BRANCH_TARGET" == "null" ]]; then
57 | # Since 'Fetch changes' step fetches default branch, we just get branch name (which will be default one).
58 | BRANCH_TARGET=$(git rev-parse --abbrev-ref HEAD)
59 | fi
60 | echo "BRANCH_TARGET=$BRANCH_TARGET" >> $GITHUB_ENV
61 |
62 | - name: Check if update branch already exists
63 | run: |
64 | echo "BRANCH_UPDATE=deps-update_${{ env.BRANCH_TARGET }}_${{ matrix.deps }}" >> $GITHUB_ENV
65 | if [[ $(git ls-remote --heads | grep deps-update_${{ env.BRANCH_TARGET }}_${{ matrix.deps }} | wc -c) -ne 0 ]]; then
66 | echo "BRANCH_UPDATE=0" >> $GITHUB_ENV
67 | fi
68 |
69 | - name: Update NPM dependencies
70 | if: env.BRANCH_UPDATE != 0
71 | run: |
72 | npm i
73 | npm install -g npm-check
74 | git checkout -b ${{ env.BRANCH_UPDATE }}
75 | npm-check -y --${{ matrix.deps }}
76 |
77 | - name: Add changes
78 | if: env.BRANCH_UPDATE != 0
79 | run: |
80 | if [[ $(git diff origin/${{ env.BRANCH_TARGET }} | wc -c) -ne 0 ]]; then
81 | git config --local user.email "${{ secrets.GH_BOT_EMAIL }}"
82 | git config --local user.name "${{ secrets.GH_BOT_USERNAME }}"
83 | git add package*.json
84 | git commit -m "Update NPM ${{ matrix.deps }} dependencies."
85 | echo "HAS_CHANGES=1" >> $GITHUB_ENV
86 | fi
87 |
88 | - name: Push changes
89 | if: env.HAS_CHANGES == 1
90 | # https://github.com/marketplace/actions/github-push
91 | uses: ad-m/github-push-action@master
92 | with:
93 | github_token: ${{ secrets.GITHUB_TOKEN }}
94 | branch: ${{ env.BRANCH_UPDATE }}
95 |
96 | - name: Create PR
97 | if: env.HAS_CHANGES == 1
98 | # https://github.com/marketplace/actions/github-pull-request-action
99 | uses: repo-sync/pull-request@v2
100 | with:
101 | source_branch: "${{ env.BRANCH_UPDATE }}"
102 | destination_branch: "${{ env.BRANCH_TARGET }}"
103 | pr_title: "Update NPM ${{ matrix.deps }} dependencies"
104 | pr_body: "Updated NPM ${{ matrix.deps }} dependencies."
105 | github_token: ${{ secrets.GITHUB_TOKEN }}
106 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /samples
6 | /tmp
7 | /out-tsc
8 |
9 | # dependencies
10 | /node_modules
11 |
12 | # IDEs and editors
13 | /.idea
14 | .project
15 | .classpath
16 | .c9/
17 | *.launch
18 | .settings/
19 | *.sublime-workspace
20 |
21 | # IDE - VSCode
22 | .vscode/*
23 | !.vscode/settings.json
24 | !.vscode/tasks.json
25 | !.vscode/launch.json
26 | !.vscode/extensions.json
27 |
28 | # misc
29 | /.sass-cache
30 | /connect.lock
31 | /coverage
32 | /libpeerconnection.log
33 | npm-debug.log
34 | yarn-error.log
35 | testem.log
36 | local.log
37 | /typings
38 | .angular/
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
44 | # Ignore package-lock.json
45 | # - we don't intent to force specific 3rd party dependency version via `package-lock.json` file
46 | # Such information should be specified in the package.json file.
47 | package-lock.json
48 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 12
2 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CKEditor 4 Angular Integration Changelog
2 |
3 | ⚠️️️ **CKEditor 4 (the open source edition) is no longer maintained.** ⚠️
4 |
5 | If you would like to keep access to future CKEditor 4 security patches, check the [Extended Support Model](https://ckeditor.com/ckeditor-4-support/), which guarantees **security updates and critical bug fixes until December 2028**. Alternatively, [upgrade to CKEditor 5](https://ckeditor.com/docs/ckeditor5/latest/updating/ckeditor4/migration-from-ckeditor-4.html).
6 |
7 | ## ckeditor4-angular 5.2.1
8 |
9 | Other Changes:
10 |
11 | * Updated default CDN CKEditor 4 dependency to [4.25.1-lts](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4251-lts).
12 | * Updated license headers to 2025.
13 | * Updated readme files to reflect the new CKEditor 4 Extended Support Model end date.
14 |
15 | Please note that this patch release doesn't provide any security fixes. It's a part of our administrative maintenance updates.
16 |
17 | ## ckeditor4-angular 5.2.0
18 |
19 | ⚠️️️ CKEditor 4 CDN dependency has been upgraded to the latest secure version. All editor versions below 4.25.0-lts can no longer be considered as secure! ⚠️
20 |
21 | Other Changes:
22 |
23 | * Updated default CDN CKEditor 4 dependency to [4.25.0-lts](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4250-lts).
24 |
25 | ## ckeditor4-angular 5.1.0
26 |
27 | ⚠️️️ CKEditor 4 CDN dependency has been upgraded to the latest secure version. All editor versions below 4.24.0-lts can no longer be considered as secure! ⚠️
28 |
29 | Other Changes:
30 |
31 | * Updated default CDN CKEditor 4 dependency to [4.24.0-lts](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4240-lts).
32 |
33 | ## ckeditor4-angular 5.0.0
34 |
35 | This release introduces a support for the LTS (”Long Term Support”) version of the editor, available under commercial terms (["Extended Support Model"](https://ckeditor.com/ckeditor-4-support/)).
36 |
37 | If you acquired the Extended Support Model for CKEditor 4 LTS, please read [the CKEditor 4 LTS key activation guide.](https://ckeditor.com/docs/ckeditor4/latest/support/licensing/license-key-and-activation.html)
38 |
39 | Other Changes:
40 |
41 | * Updated default CDN CKEditor 4 dependency to [4.23.0-lts](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4230-lts).
42 |
43 | ## ckeditor4-angular 4.0.0 / 4.0.1
44 |
45 | BREAKING CHANGES:
46 |
47 | The v4.0.1 release introduces compatibility with Angular v16+. Please note that this version of Angular no longer supports Internet Explorer 11.
48 |
49 | If you want to maintain support for IE11 or haven't upgraded to Angular v16 yet, make sure to use the Angular integration in version 3.3.0.
50 |
51 | Other Changes:
52 |
53 | * [#242](https://github.com/ckeditor/ckeditor4-angular/issues/242): Updated the minimal version of Angular to `^13.4.0` to ensure compatibility with Angular 16+. Thanks to [Moez Mehri](https://github.com/Mooeeezzzz)!
54 | * Updated default CDN CKEditor 4 dependency to [4.22.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4220--4221).
55 |
56 | **Note:** Version 4.0.1 includes a patch for the distribution bundle that fixes missing support for Angular v16+ and should be used instead of v4.0.0 if you target a newer version of Angular.
57 |
58 | ## ckeditor4-angular 3.3.0
59 |
60 | Other Changes:
61 |
62 | * Updated default CDN CKEditor 4 dependency to [4.21.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4210).
63 |
64 | ## ckeditor4-angular 3.2.2
65 |
66 | Other Changes:
67 |
68 | * Updated default CDN CKEditor 4 dependency to [4.20.2](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4202).
69 |
70 | ## ckeditor4-angular 3.2.1
71 |
72 | Other Changes:
73 |
74 | * Updated default CDN CKEditor 4 dependency to [4.20.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4201).
75 |
76 | ## ckeditor4-angular 3.2.0
77 |
78 | Other Changes:
79 |
80 | * Updated default CDN CKEditor 4 dependency to [4.20](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-420).
81 |
82 | ## ckeditor4-angular 3.1.1
83 |
84 | Other Changes:
85 |
86 | * Updated default CDN CKEditor 4 dependency to [4.19.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4191).
87 |
88 | ## ckeditor4-angular 3.1.0
89 |
90 | Other Changes:
91 |
92 | * Updated default CDN CKEditor 4 dependency to [4.19.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4190).
93 |
94 | ## ckeditor4-angular 3.0.0
95 |
96 | Other Changes:
97 |
98 | * Updated default CDN CKEditor 4 dependency to [4.18.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4180).
99 |
100 | [Web Spell Checker](https://webspellchecker.com/) ended support for WebSpellChecker Dialog on December 31st, 2021. Therefore, this plugin has been deprecated and removed from the CKEditor 4.18.0 `standard-all` preset.
101 | We strongly encourage everyone to choose one of the other available spellchecking solutions - [Spell Check As You Type (SCAYT)](https://ckeditor.com/cke4/addon/scayt) or [WProofreader](https://ckeditor.com/cke4/addon/wproofreader).
102 |
103 | ## ckeditor4-angular 2.4.1
104 |
105 | Other Changes:
106 |
107 | * Updated year and company name in the license headers.
108 | * Updated default CDN CKEditor 4 dependency to [4.17.2](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4172).
109 |
110 | ## ckeditor4-angular 2.4.0
111 |
112 | New Features:
113 |
114 | * [#190](https://github.com/ckeditor/ckeditor4-angular/issues/190): Added support for CKEditor 4 [Delayed Editor Creation](https://ckeditor.com/docs/ckeditor4/latest/features/delayed_creation.html) feature.
115 |
116 | ## ckeditor4-angular 2.3.0
117 |
118 | Other Changes:
119 |
120 | * Updated default CDN CKEditor 4 dependency to [4.17.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4171).
121 |
122 | ## ckeditor4-angular 2.2.2
123 |
124 | Other Changes:
125 |
126 | * Updated default CDN CKEditor 4 dependency to [4.16.2](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4162).
127 |
128 | ## ckeditor4-angular 2.2.1
129 |
130 | Fixed Issues:
131 |
132 | * [#191](https://github.com/ckeditor/ckeditor4-angular/issues/191): Fixed: Cannot find module `ckeditor4-integrations-common` error after upgrading to `2.2.0`.
133 |
134 | Other Changes:
135 |
136 | * Updated default CDN CKEditor 4 dependency to [4.16.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4161).
137 |
138 | ## ckeditor4-angular 2.2.0
139 |
140 | New Features:
141 |
142 | * [#143](https://github.com/ckeditor/ckeditor4-angular/issues/143): Exposed `namespaceLoaded` event fired when [`CKEDITOR` namespace](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html) is loaded, which can be used for its easier customization.
143 |
144 | ## ckeditor4-angular 2.1.0
145 |
146 | Other Changes:
147 |
148 | * Updated default CDN CKEditor 4 dependency to [4.16.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-416).
149 | * Updated year in license headers.
150 |
151 | ## ckeditor4-angular 2.0.1
152 |
153 | Other Changes:
154 |
155 | * Updated default CDN CKEditor 4 dependency to [4.15.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4151).
156 |
157 | ## ckeditor4-angular 2.0.0
158 |
159 | Breaking Changes:
160 |
161 | * [#130](https://github.com/ckeditor/ckeditor4-angular/issues/130): `DIVAREA` editor type has been deprecated. Use [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin instead (see [migration guide](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html#using-the-div-based-editor-type)).
162 |
163 | ## ckeditor4-angular 1.3.0
164 |
165 | Other Changes:
166 |
167 | * Updated default CDN CKEditor 4 dependency to [4.15.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-415).
168 | * [#98](https://github.com/ckeditor/ckeditor4-angular/issues/98): Updated repository dependencies (no changes in the actual `ckeditor4-angular` package).
169 | * [#128](https://github.com/ckeditor/ckeditor4-angular/issues/128): Improve the stability of `getEditorNamespace()` method.
170 |
171 | ## ckeditor4-angular 1.2.2
172 |
173 | Fixed Issues:
174 |
175 | * [#110](https://github.com/ckeditor/ckeditor4-angular/issues/110): Fixed: Integration throws an error when CKEditor 4 component is removed from the DOM before CKEditor 4 is loaded. Thanks to [Benjamin Hugot](https://github.com/bhugot)!
176 |
177 | ## ckeditor4-angular 1.2.1
178 |
179 | Other Changes:
180 |
181 | * Updated the default CKEditor 4 CDN dependency to [4.14.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4141).
182 |
183 | ## ckeditor4-angular 1.2.0
184 |
185 | New Features:
186 |
187 | * [#7](https://github.com/ckeditor/ckeditor4-angular/issues/7): The CKEditor 4 Angular component now exposes more CKEditor 4 native events. Thanks to [Eduard Zintz](https://github.com/ezintz)! The newly exposed events are:
188 | * [`paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste)
189 | * [`afterPaste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste)
190 | * [`dragStat`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart)
191 | * [`dragEnd`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend)
192 | * [`drop`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop)
193 | * [`fileUploadRequest`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest)
194 | * [`fileUploadResponse`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse)
195 |
196 | ## ckeditor4-angular 1.1.0
197 |
198 | Other Changes:
199 |
200 | * Updated the default CKEditor 4 CDN dependency to [4.14.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-414).
201 |
202 | ## ckeditor4-angular 1.0.1
203 |
204 | Other Changes:
205 |
206 | * Updated the default CKEditor 4 CDN dependency to [4.13.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4131).
207 |
208 | ## ckeditor4-angular 1.0.0
209 |
210 | New Features:
211 |
212 | * [#6](https://github.com/ckeditor/ckeditor4-angular/issues/6): Added support for classic (iframe-based) editor. Starting from this version classic editor is used by default.
213 | * [#40](https://github.com/ckeditor/ckeditor4-angular/pull/40): Added support for Angular 5.
214 |
215 | Fixed Issues:
216 |
217 | * [#42](https://github.com/ckeditor/ckeditor4-angular/issues/42): Fixed: The `elementRef` related error is thrown when using Angular 5.
218 | * [#54](https://github.com/ckeditor/ckeditor4-angular/issues/54): Fixed: Two-way data binding does not work when the [Undo](https://ckeditor.com/cke4/addon/undo) plugin is not present.
219 |
220 | Other Changes:
221 |
222 | * Updated the default CKEditor 4 CDN dependency to [4.13.0](https://github.com/ckeditor/ckeditor4-angular/issues/59).
223 |
224 | ## ckeditor4-angular 1.0.0-beta.2
225 |
226 | Other Changes:
227 |
228 | * Updated the default CKEditor 4 CDN dependency to [4.12.1](https://github.com/ckeditor/ckeditor4-angular/commit/2bf8a8c489f2a9ea2f2d9304e2e3d92646dbe89e).
229 |
230 | ## ckeditor4-angular 1.0.0-beta
231 |
232 | Other Changes:
233 |
234 | * [#28](https://github.com/ckeditor/ckeditor4-angular/issues/28): Updated package dev dependencies.
235 |
236 | ## ckeditor4-angular 0.1.2
237 |
238 | Other Changes:
239 |
240 | * [#20](https://github.com/ckeditor/ckeditor4-angular/issues/20): Added the "Quick Start" section to README file.
241 | * [#10](https://github.com/ckeditor/ckeditor4-angular/issues/10): Updated the LICENSE file with all required dependencies.
242 |
243 | ## ckeditor4-angular 0.1.1
244 |
245 | Other Changes:
246 |
247 | * `README.md` file improvements.
248 |
249 | ## ckeditor4-angular 0.1.0
250 |
251 | The first beta release of CKEditor 4 WYSIWYG Editor Angular Integration.
252 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Software License Agreement
2 | ==========================
3 |
4 | ## Software License Agreement for CKEditor 4 LTS Angular component (5.0 and above)
5 |
6 | **CKEditor 4 WYSIWYG editor Angular component** – https://github.com/ckeditor/ckeditor4-angular
7 | Copyright (c) 2003-2025, [CKSource](https://cksource.com/) Holding sp. z o.o. All rights reserved.
8 |
9 | CKEditor 4 LTS ("Long Term Support") is available under exclusive terms of the [Extended Support Model](https://ckeditor.com/ckeditor-4-support/). [Contact us](https://ckeditor.com/contact/) to obtain a commercial license.
10 |
11 | ## Software License Agreement for CKEditor 4 Angular component 4.0.1 and below
12 |
13 | **CKEditor 4 WYSIWYG editor Angular component** – https://github.com/ckeditor/ckeditor4-angular
14 | Copyright (c) 2003-2025, [CKSource](https://cksource.com/) Holding sp. z o.o. All rights reserved.
15 |
16 | Licensed under the terms of any of the following licenses at your
17 | choice:
18 |
19 | - GNU General Public License Version 2 or later (the "GPL")
20 | http://www.gnu.org/licenses/gpl.html
21 |
22 | - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
23 | http://www.gnu.org/licenses/lgpl.html
24 |
25 | - Mozilla Public License Version 1.1 or later (the "MPL")
26 | http://www.mozilla.org/MPL/MPL-1.1.html
27 |
28 | Sources of Intellectual Property Included in CKEditor
29 | -----------------------------------------------------
30 |
31 | 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.
32 |
33 | The following libraries are included in CKEditor 4 component for Angular under the following licenses:
34 |
35 | - load-script [MIT](https://github.com/eldargab/load-script#license)
36 | - tslib Copyright (c) 2012-2020 Microsoft [Apache-2.0](https://github.com/Microsoft/tslib/blob/master/LICENSE.txt)
37 |
38 | Trademarks
39 | ----------
40 |
41 | **CKEditor** is a trademark of [CKSource](https://cksource.com/) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
42 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CKEditor 4 WYSIWYG editor Angular component [](https://twitter.com/intent/tweet?text=Check%20out%20CKEditor%204%20Angular%20integration&url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fckeditor4-angular)
2 |
3 | [](https://www.npmjs.com/package/ckeditor4-angular)
4 | [](https://github.com/ckeditor/ckeditor4-angular)
5 | [](https://dl.circleci.com/status-badge/redirect/gh/ckeditor/ckeditor4-angular/tree/master)
6 |
7 | [](http://eepurl.com/c3zRPr)
8 | [](https://twitter.com/ckeditor)
9 |
10 | ## ⚠️ CKEditor 4: End of Life and Extended Support Model until Dec 2028
11 |
12 | CKEditor 4 was launched in 2012 and reached its End of Life (EOL) on June 30, 2023.
13 |
14 | A special edition, **[CKEditor 4 LTS](https://ckeditor.com/ckeditor-4-support/)** ("Long Term Support"), is available under commercial terms (["Extended Support Model"](https://ckeditor.com/ckeditor-4-support/)) for anyone looking to **extend the coverage of security updates and critical bug fixes**.
15 |
16 | With CKEditor 4 LTS, security updates and critical bug fixes are guaranteed until December 2028.
17 |
18 | ## About this repository
19 |
20 | ### Master branch = CKEditor 4 LTS Angular Component
21 |
22 | After June 30, 2023 the `master` version of the [LICENSE.md](https://github.com/ckeditor/ckeditor4/blob/master/LICENSE.md) file changed to reflect the license of CKEditor 4 LTS available under the Extended Support Model.
23 |
24 | This repository now contains the source code of CKEditor 4 LTS Angular Component that is protected by copyright law.
25 |
26 | ### Getting CKEditor 4 (Open Source)
27 |
28 | You may continue using CKEditor Angular Component 4.0.1 and below under the open source license terms. Please note, however, that the open source version no longer comes with any security updates, so your application will be at risk.
29 |
30 | In order to download the open source version of CKEditor 4 Angular Component, use ****tags 4.0.1 and below****. CKEditor Angular Component 4.0.1 was the last version available under the open source license terms.
31 |
32 | ## About this package
33 |
34 | Official [CKEditor 4](https://ckeditor.com/ckeditor-4/) WYSIWYG editor component for Angular.
35 |
36 | We are looking forward to your feedback! You can report any issues, ideas or feature requests on the [integration issues page](https://github.com/ckeditor/ckeditor4-angular/issues/new).
37 |
38 | 
39 |
40 | ## Usage
41 |
42 | In order to create an editor instance in Angular, install the `ckeditor4-angular` npm package as a dependency of your project:
43 |
44 | ```bash
45 | npm install --save ckeditor4-angular
46 | ```
47 |
48 | After installing, import `CKEditorModule` to your application:
49 |
50 | ```js
51 | import { CKEditorModule } from 'ckeditor4-angular';
52 |
53 | @NgModule( {
54 | imports: [
55 | ...
56 | CKEditorModule,
57 | ...
58 | ],
59 | …
60 | } )
61 | ```
62 |
63 | You can now use the `` tag in the component template to include the rich text editor:
64 |
65 | ```html
66 |
67 | ```
68 |
69 | The `data` attribute used in the example above is responsible for setting the editor’s data.
70 |
71 | ## Documentation and examples
72 |
73 | See the [CKEditor 4 Angular Integration](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html) article and [Angular examples](https://ckeditor.com/docs/ckeditor4/latest/examples/angular.html) in the [CKEditor 4 documentation](https://ckeditor.com/docs/ckeditor4/latest/).
74 |
75 | ## Browser support
76 |
77 | The CKEditor 4 Angular component works with all the [supported browsers](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_browsers.html#officially-supported-browsers) except for Internet Explorer 8-11.
78 |
79 | ## Supported Angular versions
80 |
81 | The integration can be used together with Angular at version 5.0.0 and higher. It is an implication of Angular metadata produced for this package by the Angular builder. Note that the `package.json` used in the main repository isn't published on NPM (the production one is present in `src/ckeditor/package.json`), so there are only a few peer dependencies:
82 |
83 | * `@angular/core` >= 5.0.0
84 | * `@angular/common` >= 5.0.0
85 | * `@angular/forms` >= 5.0.0
86 |
87 | required by this package.
88 |
89 | ## Contributing
90 |
91 | Here is how you can contribute to the development of the component. Any feedback and help will be most appreciated!
92 |
93 | ### Reporting issues and feature requests
94 |
95 | All issues and feature requests should be reported in the [issues section](https://github.com/ckeditor/ckeditor4-angular/issues/new) of the official GitHub repository for the CKEditor 4 Angular integration.
96 |
97 | ### Development
98 |
99 | Clone the [CKEditor 4 Angular integration repository](https://github.com/ckeditor/ckeditor4-angular).
100 |
101 | Once you have cloned it, install dependencies by running:
102 |
103 | ```bash
104 | npm install
105 | ```
106 |
107 | #### The structure of the repository
108 |
109 | This repository contains the following code:
110 |
111 | * `./src/ckeditor` contains the CKEditor component,
112 | * `./src/app` is a demo application using the component.
113 |
114 | #### Development server
115 |
116 | Run `ng serve` to start the development server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
117 |
118 | #### Building samples
119 |
120 | Run `ng build` to build the samples. The build artifacts will be stored in the `samples/` directory.
121 |
122 | #### Running unit tests
123 |
124 | Run `npm test` to execute unit tests via [Karma](https://karma-runner.github.io).
125 |
126 | There are two options available to alternate the testing process:
127 |
128 | * `url` / `u` - pass custom URL to Karma, for example custom CKEditor 4 build.
129 | * `watch` / `w` - tell Karma to watch for changes.
130 |
131 | For example:
132 |
133 | ```
134 | npm run test -- -u http://localhost:5000/ckeditor.js -w
135 | ```
136 |
137 | #### Running end-to-end tests
138 |
139 | Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protractortest.org/).
140 |
141 | #### Publishing
142 |
143 | To build and publish the package, run `npm run publish`.
144 |
145 | You can also manually build the package with `npm run build-package` which will be stored in `dist/`. Then you can publish it with `npm publish dist/`.
146 |
147 | ## License
148 |
149 | Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
150 |
151 | For full details about the license, please check the `LICENSE.md` file.
152 |
153 | ### CKEditor 4 Angular Component 4.0.1 and below for CKEditor 4 Open Source
154 |
155 | Licensed under the terms of any of the following licenses at your choice:
156 |
157 | * [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html),
158 | * [GNU Lesser General Public License Version 2.1 or later](http://www.gnu.org/licenses/lgpl.html),
159 | * [Mozilla Public License Version 1.1 or later (the "MPL")](http://www.mozilla.org/MPL/MPL-1.1.html).
160 |
161 | ### CKEditor 4 Angular Component 5.0 and above for CKEditor 4 LTS ("Long Term Support")
162 |
163 | CKEditor 4 LTS Angular Component (starting from version 5.0) is available under a commercial license only.
164 |
--------------------------------------------------------------------------------
/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "ckeditor4-angular": {
7 | "root": "",
8 | "sourceRoot": "src",
9 | "projectType": "application",
10 | "prefix": "app",
11 | "schematics": {},
12 | "architect": {
13 | "build": {
14 | "builder": "@angular-devkit/build-angular:browser",
15 | "options": {
16 | "aot": true,
17 | "outputPath": "samples/ckeditor4-angular",
18 | "index": "src/index.html",
19 | "main": "src/main.ts",
20 | "polyfills": "src/polyfills.ts",
21 | "tsConfig": "src/tsconfig.app.json",
22 | "assets": [
23 | "src/favicon.ico",
24 | "src/assets"
25 | ],
26 | "styles": [
27 | "src/styles.css"
28 | ],
29 | "scripts": []
30 | },
31 | "configurations": {
32 | "production": {
33 | "fileReplacements": [
34 | {
35 | "replace": "src/environments/environment.ts",
36 | "with": "src/environments/environment.prod.ts"
37 | }
38 | ],
39 | "optimization": true,
40 | "outputHashing": "all",
41 | "sourceMap": false,
42 | "extractCss": true,
43 | "namedChunks": false,
44 | "aot": true,
45 | "extractLicenses": true,
46 | "vendorChunk": false,
47 | "buildOptimizer": true
48 | }
49 | }
50 | },
51 | "serve": {
52 | "builder": "@angular-devkit/build-angular:dev-server",
53 | "options": {
54 | "browserTarget": "ckeditor4-angular:build"
55 | },
56 | "configurations": {
57 | "production": {
58 | "browserTarget": "ckeditor4-angular:build:production"
59 | }
60 | }
61 | },
62 | "extract-i18n": {
63 | "builder": "@angular-devkit/build-angular:extract-i18n",
64 | "options": {
65 | "browserTarget": "ckeditor4-angular:build"
66 | }
67 | },
68 | "test": {
69 | "builder": "@angular-devkit/build-angular:karma",
70 | "options": {
71 | "main": "src/test.ts",
72 | "polyfills": "src/polyfills.ts",
73 | "tsConfig": "src/tsconfig.spec.json",
74 | "karmaConfig": "src/karma.conf.js",
75 | "styles": [
76 | "src/styles.css"
77 | ],
78 | "scripts": [],
79 | "assets": [
80 | "src/favicon.ico",
81 | "src/assets"
82 | ]
83 | }
84 | },
85 | "lint": {
86 | "builder": "@angular-devkit/build-angular:tslint",
87 | "options": {
88 | "tsConfig": [
89 | "src/tsconfig.app.json",
90 | "src/tsconfig.spec.json"
91 | ],
92 | "exclude": [
93 | "**/node_modules/**"
94 | ]
95 | }
96 | }
97 | }
98 | },
99 | "ckeditor4-angular-e2e": {
100 | "root": "e2e/",
101 | "projectType": "application",
102 | "architect": {
103 | "e2e": {
104 | "builder": "@angular-devkit/build-angular:protractor",
105 | "options": {
106 | "protractorConfig": "e2e/protractor.conf.js",
107 | "devServerTarget": "ckeditor4-angular:serve"
108 | },
109 | "configurations": {
110 | "production": {
111 | "devServerTarget": "ckeditor4-angular:serve:production"
112 | }
113 | }
114 | },
115 | "lint": {
116 | "builder": "@angular-devkit/build-angular:tslint",
117 | "options": {
118 | "tsConfig": "e2e/tsconfig.e2e.json",
119 | "exclude": [
120 | "**/node_modules/**"
121 | ]
122 | }
123 | }
124 | }
125 | }
126 | },
127 | "defaultProject": "ckeditor4-angular"
128 | }
129 |
--------------------------------------------------------------------------------
/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3 | * For licensing, see LICENSE.md.
4 | */
5 |
6 | import { AppPage } from './app.po';
7 | import { element, by, protractor, WebElement } from 'protractor';
8 |
9 | describe( 'workspace-project App', () => {
10 | let page: AppPage,
11 | editables: WebElement[];
12 |
13 | beforeEach( () => {
14 | page = new AppPage;
15 | } );
16 |
17 | describe( 'simple-usage', () => {
18 | beforeEach( () => {
19 | page.navigateTo( 'simple-usage' );
20 | } );
21 |
22 | beforeEach( async () => {
23 | editables = [ await page.getEditable(), await page.getInlineEditable() ];
24 | } );
25 |
26 | it( 'should display welcome message', () => {
27 | expect( page.getParagraphText() ).toEqual( 'CKEditor 4 integration with Angular' );
28 | } );
29 |
30 | it( 'should display editor with initial content', () => {
31 | editables.forEach( editable => expect( page.getHtmlString( editable ) )
32 | .toBe( '
Getting used to an entirely different culture can be challeng' +
33 | 'ing. While it’s also nice to learn about cultures online or from books, nothing comes close to experiencing cultural d' +
34 | 'iversity in person. You learn to appreciate each and every single one of the differences while you become more cultura' +
35 | 'lly fluid.
39 | Note that it's only a prove of concept of using the `ngModel`.
40 | It allows editing, but the editor instantly strips out unknown tags and autoparagraphs text outside of block
41 | elements.
42 |
\n'
88 | }
89 | ] );
90 | } );
91 |
92 | // This test passes when run solo or testes as first, but throws a type error when run after other tests.
93 | it( 'when change event is emitted should show form data preview', done => {
94 | whenEvent( 'change', ckeditorComponent ).then( () => {
95 | fixture.detectChanges();
96 | expect( component.formDataPreview ).toEqual( '{"name":"John","surname":"Doe","description":"
\n' );
116 | } );
117 | } );
118 | } );
119 | } );
120 |
121 | describe( 'listeners', () => {
122 | beforeEach( () => {
123 | spy = spyOn( console, 'log' );
124 | } );
125 |
126 | it( 'ready should be called on ckeditorComponent.ready()', () => {
127 | each( ( ckeditorComponent, name ) => {
128 | ckeditorComponent.ready.emit();
129 |
130 | expect( spy ).toHaveBeenCalledWith( `${ name } editor is ready.` );
131 | } );
132 | } );
133 |
134 | it( 'change should be called on ckeditorComponent.change()', () => {
135 | each( ( ckeditorComponent, name ) => {
136 | ckeditorComponent.change.emit();
137 |
138 | expect( spy ).toHaveBeenCalledWith( `${ name } editor model changed.` );
139 | } );
140 | } );
141 |
142 | it( 'focus should be called on ckeditorComponent.focus()', () => {
143 | each( ( ckeditorComponent, name ) => {
144 | ckeditorComponent.focus.emit();
145 |
146 | name = name.toLowerCase();
147 |
148 | expect( spy ).toHaveBeenCalledWith( `Focused ${ name } editing view.` );
149 | } );
150 | } );
151 |
152 | it( 'blur should be called on ckeditorComponent.blur()', () => {
153 | each( ( ckeditorComponent, name ) => {
154 | ckeditorComponent.blur.emit();
155 |
156 | name = name.toLowerCase();
157 |
158 | expect( spy ).toHaveBeenCalledWith( `Blurred ${ name } editing view.` );
159 | } );
160 | } );
161 | } );
162 |
163 | function whenEach( callback ) {
164 | return Promise.all( ckeditorComponents.map( ckeditorComponent => callback( ckeditorComponent ) ) );
165 | }
166 |
167 | function each( callback ) {
168 | ckeditorComponents.forEach( item => {
169 | let name: String = item.type;
170 |
171 | name = name[ 0 ].toUpperCase() + name.slice( 1 );
172 |
173 | callback( item, name );
174 | } );
175 | }
176 | } );
177 |
--------------------------------------------------------------------------------
/src/app/simple-usage/simple-usage.component.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3 | * For licensing, see LICENSE.md.
4 | */
5 |
6 | import { Component } from '@angular/core';
7 |
8 | import { CKEditor4 } from '../../ckeditor/ckeditor';
9 |
10 | @Component( {
11 | selector: 'app-simple-usage',
12 | templateUrl: './simple-usage.component.html',
13 | styleUrls: [ './simple-usage.component.css' ]
14 | } )
15 | export class SimpleUsageComponent {
16 | public isReadOnly = false;
17 | public editorData =
18 | `
Getting used to an entirely different culture can be challenging.
19 | While it’s also nice to learn about cultures online or from books, nothing comes close to experiencing cultural diversity in person.
20 | You learn to appreciate each and every single one of the differences while you become more culturally fluid.