angular-froala-wysiwyg icon indicating copy to clipboard operation
angular-froala-wysiwyg copied to clipboard

Froala model not updated when copy pasting content

Open dev-ivd opened this issue 5 years ago • 6 comments

We use Froala 2.9.4, because we are not able to migrate due to incompatibility.

When copying content from a Froala editor instance and pasting this into another instance, Froala is not detecting changes unless a key is pressed. This means that pasting into that instance, does nothing, froalaModelChange is not fired and froalaModel is not changed, unless I press a key.

I went through the changelog and noticed in version 2.9.4 the hotfix

Copy / paste from another FE instance

So I assumed this was fixed, but it has not.

Is this a bug? If so, can this only be fixed by migrating to version 3, or is there another solution?

dev-ivd avatar Nov 13 '19 09:11 dev-ivd

Can someone confirm this behaviour also occurs in the latest version of Froala? Meaning you have 2 instances, copy paste from one instance to another, and froalaModel is not changed when simply pasting the content.

dev-ivd avatar Nov 21 '19 19:11 dev-ivd

I can confirm that...I used the latest version.

Here is an older version (2.8) : https://stackblitz.com/edit/ng-froala-placeholder-bug-cqdjde?file=app%2Ffroala-editor%2Ffroala-editor.component.html .

but we're locally using the latest version for our company, and I reproduced it (version 3.0).

skayikci avatar Nov 22 '19 08:11 skayikci

Is there a workaround for this, since Froala still has not fixed this?

We simply want the froalaModel to change when our clients our pasting content. I don't understand why this does not trigger anything in Froala, we have tried all the events that trigger change, but it does nothing when copying from one instance and pasting it into another.

dev-ivd avatar Nov 22 '19 10:11 dev-ivd

We also couldn't find a solution, sorry, and already informed our customers about this. I hope it is resolved soon...

skayikci avatar Nov 25 '19 13:11 skayikci

I have similar issue when pasting same content in froala editor I have created minimal reproduction for this here https://stackblitz.com/edit/angular-froala-13aagf-eaa5y5?file=src%2Fapp%2Fapp.component.html

what is happening here is I am using reactive form with froala editor, so when u click on clear button, form value is set to null, and when froalaModelChange event is fired then I update the form values, I have bind the form values directly to froalaModel

STEPS to reproduce the issue on the link

  1. enter some content in the editor for ex. "Demo", and copy this content
  2. clear the content with help of clear button
  3. now paste the same content in the editor

repeat the step 2 & 3 for couple of times and observe behavior, after doing this 2-3 times froalaModelChange event is not getting fired.

Let me know if I'm doing something wrong here.. or this is an issue with editor

HardikSLathiya avatar Jun 01 '21 12:06 HardikSLathiya

I have the same problem. I use with froala version - 3.1.1-1 When our customers make a copy paste from one show to another froalaModel does not change.

Has a solution to the problem already emerged?

riv-riv avatar May 03 '22 11:05 riv-riv