-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
CKEditor 5 integration for Angular 2+ #1020
Comments
Isn't better to statically specify the editor type and use the static import? Does someone want to dynamically pick the editor type? Or you did it to create a lighter bundle and import editor's build when the it's needed? |
Note, that in TS lowercase is used for basic types and uppercase for e.g. boxed types (like |
The |
To exemplify what I mean – that's how we see the use of the React component: import React, { Component } from 'react';
import './App.css';
import CKEditor from 'cke5-react';
import ClassicEditorBuild from '@ckeditor/ckeditor5-build-classic';
class App extends Component {
render() {
return (
<div className="App">
<h2>CKEditor 5 using build-classic</h2>
<CKEditor
editor={ ClassicEditorBuild }
data="<p>Hello from CKEditor 5</p>"
onChange={ data => console.log( data ) }
/>
</div>
);
}
}
export default App; The |
So it can be done similarly from the parent component: import { Component } from '@angular/core';
import * as ClassicEditorBuild from '@ckeditor/ckeditor5-build-classic';
@Component( {
selector: 'my-app',
template:
`<main>
<ckeditor [editor]="editor" [data]="data"></ckeditor>
</main>`
} )
export class AppComponent {
private editor = ClassicEditorBuild;
private data = "<p>Some content</p>"
} So later the editor constructor will be visible in the The only thing is, that we don't have any TS typings for our JS files, so there is a warning when importing some CKEditor5 stuff. |
I think for:
you will need to use an implementation of an abstract factory with You might do it with a switch statement around your dynamic import in |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Looking at it, I assume (change)="something()" is the way to catch event, but that did not fire anything, what is the way to catch events? |
@ayyash, I guess, for that |
Okay I have a problem, this line |
There's |
And we've got a first pull request: ckeditor/ckeditor5-angular#2 by @oleq. Feedback needed :) |
Any updates on this?? |
I'm actively working on this, so I'll keep you updated. |
@ma2ciek That's great news - powodzenia! |
@piernik, you can check out the current implementation on the ckeditor/ckeditor5-angular#2 I've updated many things and this implementation should work well with |
Is it available on npm? |
Update: The Run If you have any trouble, please, report it in the https://github.com/ckeditor/ckeditor5-angular. All feedback is welcomed! |
Does it work with Angular 6? |
Yes, it should work. |
This comment has been minimized.
This comment has been minimized.
Hi, @AlanObject. Could you post the issue in the |
Update:
The
ckeditor5-angular
package has been published on the NPM 🎉See our docs to check how you can customize and integrate the
<ckeditor>
component in your Angular application. If you have any trouble, please, report it in the ckeditor/ckeditor5-angular repository. Feature request are welcome too :)All feedback is welcome!
The text was updated successfully, but these errors were encountered: