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

Webpack installation #54

Closed
jarrettj opened this issue Oct 27, 2016 · 13 comments
Closed

Webpack installation #54

jarrettj opened this issue Oct 27, 2016 · 13 comments
Labels

Comments

@jarrettj
Copy link

Hi, good day.

How do you use this editor with webpack?

@rogueRabbit
Copy link

I want to ask the same question, If you have time, please help us, Thank you very much!

@claboran
Copy link

claboran commented Nov 8, 2016

Hi,

had the same issue. Any help appreciated.

It seems that CKEDITOR is missing, I tried to add it to angular-cli.json
"scripts": [ "../node_modules/ckeditor/ckeditor.js" ],
but that gave me another error: error_handler.js:54 TypeError: Cannot set property 'dir' of undefined

@yabab-dev
Copy link
Owner

See #41

@mourahi
Copy link

mourahi commented Nov 11, 2016

1/ copy this file "ckeditor.componet.ts" to your src directory.
2/ add to your app component file :
import {CKEditorComponent} from './ckeditor.component'; declare var CKEDITOR : any;
3/add <script src="https://cdn.ckeditor.com/4.5.11/full/ckeditor.js"></script> to your index.html file, inside header tag.
4/add to your html component file <ckeditor [(ngModel)]="ckeditorContent" [config]="{uiColor: '#99000'}" (change)="onChange($event)" (ready)="onReady($event)" (blur)="onBlur($event)" debounce="500"> </ckeditor>

@claboran
Copy link

Hi Adil, thanks for your help. Do you have any idea how to get it up without having to include the CKEDITOR from the CDN? I wanted to get it by npm. Here I struggled with Webpack. It seems that the recommended approach, including the js with the angular-cli.json does not work.
Thanks in advance.

Christian

@yabab-dev
Copy link
Owner

@claboran , please see #41 : you can't bundle CKEditor with webpack...

@mourahi
Copy link

mourahi commented Dec 12, 2016

Hi Christian,
ckeditor is working for me in webpack with only cdn.
I 'am sorry, i don't have any idea to get it up without having to include the CKEDITOR from the CDN.

Adil MOURAHI

@morriq
Copy link

morriq commented Dec 13, 2016

Hello.
Of course you can use CKEditor with webpack. you just need to use CopyWebpackPlugin with something like this: {from: '../node_modules/ckeditor', to: 'ckeditor'}

and set proper path in window.CKEDITOR_BASEPATH (='/ckeditor/')

@claboran
Copy link

@mourahi: Thanks for the help. I will take the simpler approach and use it via CDN for now.
@morriq - In the next free slot, I will give the CopyWebpackPlugin a try as well ...
Thanks for your help.

@Bhavin990
Copy link

i'm using ckeditor with angular 2 meanwhile i facing issue, so please help us
XHR error (404 Not Found) loading http://localhost:3001/ng2-ckeditor
Error loading http://localhost:3001/ng2-ckeditor as "ng2-ckeditor" from http://localhost:3001/app/app.module.js

@SiddharthBhutoria
Copy link

@claboran did you try implementing @morriq solutions? if yes, is it working?

@SiddharthBhutoria
Copy link

@morriq I didn't get understand it clearly copyWebpackPlugin part. Could you please clarify or elaborate?

@chinthu
Copy link

chinthu commented Jul 1, 2019

@morriq Any update on this, did you got ckeditor running ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants