-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
4,760 additions
and
3,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { CKEditorModule } from 'src/ckeditor'; | ||
import { ContextDemoComponent } from './context-demo'; | ||
|
||
@NgModule( { | ||
declarations: [ | ||
ContextDemoComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
CKEditorModule, | ||
RouterModule.forChild( [ | ||
{ | ||
path: '', | ||
component: ContextDemoComponent | ||
} | ||
] ) | ||
] | ||
} ) | ||
export class ContextDemoModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | ||
|
||
import { CKEditorModule } from 'src/ckeditor'; | ||
import { DemoFormComponent } from './demo-form.component'; | ||
|
||
@NgModule( { | ||
declarations: [ | ||
DemoFormComponent | ||
], | ||
imports: [ | ||
FormsModule, | ||
ReactiveFormsModule, | ||
BrowserModule, | ||
CKEditorModule, | ||
RouterModule.forChild( [ | ||
{ | ||
path: '', | ||
component: DemoFormComponent | ||
} | ||
] ) | ||
] | ||
} ) | ||
export class DemoFormModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | ||
|
||
import { CKEditorModule } from 'src/ckeditor'; | ||
import { DemoReactiveFormComponent } from './demo-reactive-form.component'; | ||
|
||
@NgModule( { | ||
declarations: [ | ||
DemoReactiveFormComponent | ||
], | ||
imports: [ | ||
FormsModule, | ||
ReactiveFormsModule, | ||
BrowserModule, | ||
CKEditorModule, | ||
RouterModule.forChild( [ | ||
{ | ||
path: '', | ||
component: DemoReactiveFormComponent | ||
} | ||
] ) | ||
] | ||
} ) | ||
export class DemoReactiveFormModule {} |
22 changes: 22 additions & 0 deletions
22
src/app/initialization-crash/initialization-crash.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { CKEditorModule } from 'src/ckeditor'; | ||
import { InitializationCrashComponent } from './initialization-crash.component'; | ||
|
||
@NgModule( { | ||
declarations: [ | ||
InitializationCrashComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
CKEditorModule, | ||
RouterModule.forChild( [ | ||
{ | ||
path: '', | ||
component: InitializationCrashComponent | ||
} | ||
] ) | ||
] | ||
} ) | ||
export class InitializationCrashModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
:host ::ng-deep .ck.ck-editor__editable.ck-read-only { | ||
background: #fafafa; | ||
color: #888; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<h2>Simple CDN usage</h2> | ||
|
||
<p><strong>Note:</strong> Open the console for additional logs.</p> | ||
|
||
<p> | ||
<button (click)="toggleDisableEditors()">{{ isDisabled ? 'Enable editors' : 'Disable editors' }}</button> | ||
</p> | ||
|
||
<h3>Classic build</h3> | ||
<ckeditor | ||
*ngIf="Editor" | ||
|
||
[data]="editorData" | ||
[editor]="Editor" | ||
[disabled]="isDisabled" | ||
id="classic-editor" | ||
name="classic-editor" | ||
|
||
(ready)="onReady()" | ||
(change)="onChange()" | ||
(focus)="onFocus()" | ||
(error)="onError()" | ||
(blur)="onBlur()"> | ||
</ckeditor> | ||
|
||
<h4>Component events:</h4> | ||
<ul> | ||
<li *ngFor="let eventInfo of componentEvents"> | ||
<span>{{ eventInfo }}</span> | ||
</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { Component, type OnInit } from '@angular/core'; | ||
import type { ClassicEditor } from 'https://cdn.ckeditor.com/typings/ckeditor5.d.ts'; | ||
|
||
import { createCdnEditor } from 'src/editor/create-cdn-editor'; | ||
import { loadCKEditorCloud } from '@ckeditor/ckeditor5-integrations-common'; | ||
|
||
@Component( { | ||
selector: 'app-simple-cdn-usage', | ||
templateUrl: './simple-cdn-usage.component.html', | ||
styleUrls: [ './simple-cdn-usage.component.css' ] | ||
} ) | ||
export class SimpleCdnUsageComponent implements OnInit { | ||
public Editor: typeof ClassicEditor | null = null; | ||
|
||
public isDisabled = false; | ||
public editorData = | ||
`<p>Getting used to an entirely different culture can be challenging. | ||
While it’s also nice to learn about cultures online or from books, nothing comes close to experiencing cultural diversity in person. | ||
You learn to appreciate each and every single one of the differences while you become more culturally fluid.</p>`; | ||
|
||
public componentEvents: Array<string> = []; | ||
|
||
public toggleDisableEditors(): void { | ||
this.isDisabled = !this.isDisabled; | ||
} | ||
|
||
public ngOnInit(): void { | ||
loadCKEditorCloud( { | ||
version: '43.0.0' | ||
} ) | ||
.then( cloud => { | ||
this.Editor = createCdnEditor( { | ||
cloud | ||
} ); | ||
} ); | ||
} | ||
|
||
public onReady(): void { | ||
this.componentEvents.push( 'The editor is ready.' ); | ||
} | ||
|
||
public onChange(): void { | ||
this.componentEvents.push( 'Editor model changed.' ); | ||
} | ||
|
||
public onFocus(): void { | ||
this.componentEvents.push( 'Focused the editing view.' ); | ||
} | ||
|
||
public onBlur(): void { | ||
this.componentEvents.push( 'Blurred the editing view.' ); | ||
} | ||
|
||
public onError(): void { | ||
this.componentEvents.push( 'The editor crashed.' ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { CKEditorModule } from 'src/ckeditor'; | ||
import { SimpleCdnUsageComponent } from './simple-cdn-usage.component'; | ||
|
||
@NgModule( { | ||
declarations: [ | ||
SimpleCdnUsageComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
CKEditorModule, | ||
RouterModule.forChild( [ | ||
{ | ||
path: '', | ||
component: SimpleCdnUsageComponent | ||
} | ||
] ) | ||
] | ||
} ) | ||
export class SimpleCdnUsageModule {} |
Oops, something went wrong.