Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (124 commits)
  Bump acorn from 6.3.0 to 6.4.1
  Update Travis config to latest spec.
  Disable Travis caching.
  Remove install unnecessary after bumping dependency.
  Bump Protractor dependency which contains newer webdriver-manager package.
  Add CHANGELOG.md to build process.
  Changelog updated.
  Started 1.1.1 development.
  Updated package-lock version to 1.1.0.
  Updated package version to 1.1.0.
  Updated default CDN CKEditor 4 dependency to 4.14.0.
  Updated deps license entry.
  Updated license header to 2020.
  Started 1.0.2 development.
  Updated default CDN CKEditor 4 dependency to 4.13.1.
  Started 1.0.1 developemnt.
  Changelog adjustments.
  NPM package files updated.
  Tests: Removed 'debugger' leftover. [skip ci]
  Tests: Ignore one failing test (see ckeditor#72).
  ...
  • Loading branch information
ezintz committed Apr 10, 2020
2 parents 844f1fd + d2d537d commit cd45929
Show file tree
Hide file tree
Showing 35 changed files with 11,603 additions and 10,050 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Are you reporting a feature request or a bug?

<!--
Before reporting your issue make sure there are no duplicates already reported.
Please **do not report security issues here**, use the contact form at https://ckeditor.com/contact/ instead.
Replace this comment with your issue type: Bug / Feature request / Other, please explain.
-->

## Provide detailed reproduction steps (if any)

1.
2.
3.

### Expected result

*What is the expected result of the above steps?*

### Actual result

*What is the actual result of the above steps?*

## Other details

* Browser: …
* OS: …
* Integration version: …
* CKEditor version: …
* Installed CKEditor plugins: …
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
os: linux
dist: xenial

services:
- xvfb

addons:
chrome: stable
firefox: latest

language: node_js
node_js:
- 10

cache:
npm: false

before_install:
- 'export DISPLAY=:99.0'
install:
- npm install
script:
- ng test && ng e2e
env:
global:
- secure: nbn1MJ/N+shUkYqXqKxzQJw30F8q7XC4LNxuMYuP13deUI1/XzRW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AKM+UVYYEU0vmhR38C1O8U6O4KDrI01TxV6WidgyNGlqDjmPyESNBvJMTsNB75iRsCczn+v1pwLyVLrdrPInDtdXnBh/5LnwbNEFpf9g6L3XQl9HYgfev3O+Ci+6c0Sz4GCvS41vs2afXWmoARSBGFPBLSTtNIMtVJ2VlOXxcOPOPTbpzYjgs8KOqXQvYtYJp0cKWChuerdKBNu5p5/c1l1IDTTfOIdDD1oXvA9FJaCmAEZtU6GJ1in9DjDeSw=
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# CKEditor 4 Angular Integration Changelog

## ckeditor4-angular 1.1.0

Other Changes:

* Updated the default CKEditor 4 CDN dependency to [4.14.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-414).

## ckeditor4-angular 1.0.1

Other Changes:

* Updated the default CKEditor 4 CDN dependency to [4.13.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4131).

## ckeditor4-angular 1.0.0

New Features:

* [#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.
* [#40](https://github.com/ckeditor/ckeditor4-angular/pull/40): Added support for Angular 5.

Fixed Issues:

* [#42](https://github.com/ckeditor/ckeditor4-angular/issues/42): Fixed: The `elementRef` related error is thrown when using Angular 5.
* [#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.

Other Changes:

* Updated the default CKEditor 4 CDN dependency to [4.13.0](https://github.com/ckeditor/ckeditor4-angular/issues/59).

## ckeditor4-angular 1.0.0-beta.2

Other Changes:

* Updated the default CKEditor 4 CDN dependency to [4.12.1](https://github.com/ckeditor/ckeditor4-angular/commit/2bf8a8c489f2a9ea2f2d9304e2e3d92646dbe89e).

## ckeditor4-angular 1.0.0-beta

Other Changes:

* [#28](https://github.com/ckeditor/ckeditor4-angular/issues/28): Updated package dev dependencies.

## ckeditor4-angular 0.1.2

Other Changes:

* [#20](https://github.com/ckeditor/ckeditor4-angular/issues/20): Added the "Quick Start" section to README file.
* [#10](https://github.com/ckeditor/ckeditor4-angular/issues/10): Updated the LICENSE file with all required dependencies.

## ckeditor4-angular 0.1.1

Other Changes:

* `README.md` file improvements.

## ckeditor4-angular 0.1.0

The first beta release of CKEditor 4 WYSIWYG Editor Angular Integration.
12 changes: 4 additions & 8 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Software License Agreement
==========================

**CKEditor 4 component for Angular**https://github.com/ckeditor/ckeditor4-angular <br>
Copyright (c) 2003-2019, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
**CKEditor 4 WYSIWYG editor Angular component**https://github.com/ckeditor/ckeditor4-angular <br>
Copyright (c) 2003-2020, [CKSource](https://cksource.com/) Frederico Knabben. All rights reserved.

Licensed under the terms of any of the following licenses at your
choice:
Expand All @@ -23,14 +23,10 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor 4 component for Angular under the following licenses:

- Angular Copyright (c) 2010-2019 Google LLC. [MIT](http://angular.io/license)
- core-js Copyright (c) 2014-2019 Denis Pushkarev [MIT](https://github.com/zloirock/core-js/blob/master/LICENSE)
- load-script [MIT](https://github.com/eldargab/load-script#license)
- RxJS: Reactive Extensions For JavaScript [Apache-2.0](https://github.com/ReactiveX/rxjs/blob/master/LICENSE.txt)
- tslib Copyright (c) 2012-2019 Microsoft [Apache-2.0](https://github.com/Microsoft/tslib/blob/master/LICENSE.txt)
- Zone.js Copyright (c) 2016-2018 Google, Inc. [MIT](https://github.com/angular/zone.js/blob/master/LICENSE)
- tslib Copyright (c) 2012-2020 Microsoft [Apache-2.0](https://github.com/Microsoft/tslib/blob/master/LICENSE.txt)

Trademarks
----------

**CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
**CKEditor** is a trademark of [CKSource](https://cksource.com/) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
124 changes: 104 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,136 @@
# CKEditor 4 WYSIWYG editor Angular component
# CKEditor 4 WYSIWYG editor Angular component [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20CKEditor%204%20Angular%20integration&url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fckeditor4-angular)

Official [CKEditor 4](https://ckeditor.com/ckeditor-4/) WYSIWYG editor Angular component for Angular 2+.
[![npm version](https://badge.fury.io/js/ckeditor4-angular.svg)](https://www.npmjs.com/package/ckeditor4-angular)
[![GitHub tag](https://img.shields.io/github/tag/ckeditor/ckeditor4-angular.svg)](https://github.com/ckeditor/ckeditor4-angular)

## Documentation
[![Build Status](https://travis-ci.org/ckeditor/ckeditor4-angular.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor4-angular)
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor4-angular/status.svg)](https://david-dm.org/ckeditor/ckeditor4-angular)
[![devDependency Status](https://david-dm.org/ckeditor/ckeditor4-angular/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor4-angular?type=dev)

See the [CKEditor 4 Angular Integration](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html) article.
[![Join newsletter](https://img.shields.io/badge/join-newsletter-00cc99.svg)](http://eepurl.com/c3zRPr)
[![Follow Twitter](https://img.shields.io/badge/follow-twitter-00cc99.svg)](https://twitter.com/ckeditor)

### Browser support
Official [CKEditor 4](https://ckeditor.com/ckeditor-4/) WYSIWYG editor component for Angular.

CKEditor 4 Angular component fully works with all the [supported browsers](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_browsers.html#officially-supported-browsers) except for IE8-10.
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).

![CKEditor 4 screenshot](https://c.cksource.com/a/1/img/npm/ckeditor4.png)

## Usage

In order to create an editor instance in Angular, install the `ckeditor4-angular` npm package as a dependency of your project:

```bash
npm install --save ckeditor4-angular
```

After installing, import `CKEditorModule` to your application:

```js
import { CKEditorModule } from 'ckeditor4-angular';

@NgModule( {
imports: [
...
CKEditorModule,
...
],
} )
```

You can now use the `<ckeditor>` tag in the component template to include the rich text editor:

```html
<ckeditor data="<p>Hello, world!</p>"></ckeditor>
```

The `data` attribute used in the example above is responsible for setting the editor’s data.

## Documentation and examples

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/).

## Browser support

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-10.

## Supported Angular versions

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:

* `@angular/core` >= 5.0.0
* `@angular/common` >= 5.0.0
* `@angular/forms` >= 5.0.0

required by this package.

## Contributing

Once you have cloned the repository, install dependecies:
Here is how you can contribute to the development of the component. Any feedback and help will be most appreciated!

### Reporting issues and feature requests

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.

### Development

Clone the [CKEditor 4 Angular integration repository](https://github.com/ckeditor/ckeditor4-angular).

Once you have cloned it, install dependencies by running:

```bash
npm install
```

### The structure of the repository
#### The structure of the repository

This repository contains the following code:

* `./src/ckeditor` contains the CKEditor component,
* `./src/app` is a demo application using the component.

### Development server
#### Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
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.

### Build samples
#### Building samples

Run `ng build` to build the samples. The build artifacts will be stored in the `samples/` directory.

### Running unit tests
#### Running unit tests

Run `npm test` to execute unit tests via [Karma](https://karma-runner.github.io).

There are two options available to alternate the testing process:

* `url` / `u` - pass custom URL to Karma, for example custom CKEditor 4 build.
* `watch` / `w` - tell Karma to watch for changes.

For example:

```
npm run test -- -u http://localhost:5000/ckeditor.js -w
```

#### Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protractortest.org/).

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
#### Publishing

### Running end-to-end tests
To build and publish the package, run `npm run publish`.

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
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/`.

### Publishing
## License

To build and publish the package run `npm run publish`. 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/`.
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.

### License
Licensed under the terms of any of the following licenses at your choice:

Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html),
* [GNU Lesser General Public License Version 2.1 or later](http://www.gnu.org/licenses/lgpl.html),
* [Mozilla Public License Version 1.1 or later (the "MPL")](http://www.mozilla.org/MPL/MPL-1.1.html).

For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
For full details about the license, please check the `LICENSE.md` file.
4 changes: 2 additions & 2 deletions e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand All @@ -24,7 +24,7 @@ describe( 'workspace-project App', () => {
} );

it( 'should display welcome message', () => {
expect( page.getParagraphText() ).toEqual( 'CKEditor integration with Angular 2+' );
expect( page.getParagraphText() ).toEqual( 'CKEditor 4 integration with Angular' );
} );

it( 'should display editor with initial content', async () => {
Expand Down
9 changes: 8 additions & 1 deletion e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

Expand Down Expand Up @@ -39,10 +39,17 @@ export class AppPage {
async updateValue( el: WebElement, keys: string[] ) {
await el.click();
await this.selectAll();
// Since Chrome 77 with webdirver-manager@12.1.7 protractor.sendKeys() doesn't
// clear current selection, we have to clean it manually (#51).
await this.delete();
await el.sendKeys( ...keys );
}

selectAll() {
return browser.executeScript( 'document.execCommand( "selectAll", false, null )' );
}

delete() {
return browser.executeScript( 'document.execCommand( "delete", false, null )' );
}
}
Loading

0 comments on commit cd45929

Please sign in to comment.