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

Paste text doesn't fire change EventEmitter #284

Closed
arthurhamon opened this issue Sep 11, 2019 · 4 comments
Closed

Paste text doesn't fire change EventEmitter #284

arthurhamon opened this issue Sep 11, 2019 · 4 comments

Comments

@arthurhamon
Copy link

Hi,

I don't know why, but when I paste plain text to the editor, the (change) Event is not fire.
I need to type another character after pasting text to have the (change) event to be fire.

Does anyone know how to trigger (change) each time (paste) is fire ?

Thank you

@kzimny
Copy link
Collaborator

kzimny commented Sep 11, 2019

check the demo project. Show your ng2-ckeditor configuration.

@arthurhamon
Copy link
Author

<ckeditor [config]="ckEditorConfig" [readonly]="false" [value]="ct.value.value" (paste)="onPaste($event)" (change)="onChange($event, ct)" (editorChange)="ct.value.setValue($event)" debounce="500" > </ckeditor>

`public onChange(event, ct) {
console.log('On change');
ct.value.setValue(event);
}

public onPaste(event) {
console.log('On paste', event);
}`

ckEditorConfig = { uiColor: '#FFFFFF', removeButtons: 'Anchor', forcePasteAsPlainText: true, extraPlugins: 'divarea', // https://stackoverflow.com/questions/44916183/how-to-destroy-ckeditor-in-angular-application?answertab=votes#tab-top disallowedContent: '*{font*}', // Thank you chrome https://ckeditor.com/old/comment/129713#comment-129713 }

@arthurhamon
Copy link
Author

Hello, in you example this is working like a charm
But not in my app, this is trigger 1 time after a thousand paste

@kzimny
Copy link
Collaborator

kzimny commented Sep 12, 2019

try with exact the same configuration as in demo project, something seems to be wrong in your project

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

No branches or pull requests

2 participants