Skip to content
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

Cannot read property 'data-ck-expando' of undefined #125

Closed
emrade opened this issue Jul 17, 2019 · 6 comments
Closed

Cannot read property 'data-ck-expando' of undefined #125

emrade opened this issue Jul 17, 2019 · 6 comments
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. resolution:resolved This issue was already resolved (e.g. by another ticket). type:question

Comments

@emrade
Copy link

emrade commented Jul 17, 2019

I followed the angular integration as stated on the website and after i was done i got the warning below.
Could not find a declaration file for module '@ckeditor/ckeditor5-build-classic'. 'path_to_dir/node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js' implicitly has an 'any' type. Try npm install @types/ckeditor__ckeditor5-build-classic if it exists or add a new declaration (.d.ts) file containing declare module '@ckeditor/ckeditor5-build-classic';

Then i followed the instructions on this link #122 to solve the issue.

After, i noticed that when i navigate from the page i used the ckeditor to another page i get errors on my console.
ERROR Error: "Uncaught (in promise): TypeError: t is undefined ur@http://localhost:4200/vendor.js:93111:179895....
The error doesn't say anything specific. Please do you know how i can solve the issue?
Let me know if you need any more info from me.

ng version
Angular CLI: 8.0.6
Node: 12.4.0
OS: win32 x64
Angular: 8.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.800.6
@angular-devkit/build-angular 0.800.6
@angular-devkit/build-optimizer 0.800.6
@angular-devkit/build-webpack 0.800.6
@angular-devkit/core 8.0.6
@angular-devkit/schematics 8.0.6
@angular/cli 8.0.6
@ngtools/webpack 8.0.6
@schematics/angular 8.0.6
@schematics/update 0.800.6
rxjs 6.4.0
typescript 3.4.5
webpack 4.30.0

@Mgsy
Copy link
Member

Mgsy commented Jul 18, 2019

Hi, can you share your integration code? It will be easier for us to find a source of the problem.

@Mgsy Mgsy added the pending:feedback This issue is blocked by necessary feedback. label Jul 18, 2019
@emrade
Copy link
Author

emrade commented Jul 18, 2019

Added import { CKEditorModule } from '@ckeditor/ckeditor5-angular'; to the module imports

// file.ts
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
public Editor = ClassicEditor; config = { toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'insertTable', 'mediaEmbed', 'undo', 'redo' ], placeholder: 'Type a description...' };

// file.html
<ckeditor [editor]="Editor" [config]="config"></ckeditor>

// typings.d.ts
declare module '@ckeditor/ckeditor5-build-classic';

That is basically all the code

@emrade
Copy link
Author

emrade commented Jul 18, 2019

Hello, i used chrome to run the project and this time the error was clearer.
Uncaught (in promise): TypeError: Cannot read property 'data-ck-expando' of undefined

@emrade emrade changed the title "Uncaught (in promise): TypeError: t is undefined Cannot read property 'data-ck-expando' of undefined Jul 18, 2019
@emrade
Copy link
Author

emrade commented Jul 18, 2019

After finding out what the real issue was. I checked out the current issues and found that someone else already experienced it.

I read through and found a solution #109 (comment) which was to update the project to angular 8.1. That worked for me.

Thank you. The ckeditor is really great. Keep up the good work.

@emrade emrade closed this as completed Jul 18, 2019
@Mgsy
Copy link
Member

Mgsy commented Jul 19, 2019

Great to hear that you managed to solve your problem 🎉

@Mgsy Mgsy added resolution:fixed type:question and removed pending:feedback This issue is blocked by necessary feedback. labels Jul 19, 2019
@gvreddy04
Copy link

gvreddy04 commented Oct 30, 2019

This worked for me. #109 (comment)

@ma2ciek ma2ciek added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label Nov 13, 2019
@Reinmar Reinmar added resolution:resolved This issue was already resolved (e.g. by another ticket). and removed resolution:solved labels Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. resolution:resolved This issue was already resolved (e.g. by another ticket). type:question
Projects
None yet
Development

No branches or pull requests

5 participants