Akash Gadhiya
Akash Gadhiya

Reputation: 380

Cursor is always placed before the paper clip icon when file is inserted in Froala editors

Step to reproduce::

  1. Open Froala link

  2. Clear editors.

  3. Click on the file icon and select file.

  4. Issue:: Cursor is always placed before the paper clip icon.

Acceptance Criteria:: Cursor is placed after a paper clip icon when a file is attached to editors.

Video::

enter image description here

Upvotes: 3

Views: 233

Answers (1)

Akash Gadhiya
Akash Gadhiya

Reputation: 380

This problem has occurred in some browsers. I have applied one trick to solve the problem.

Triggered before uploading a file to the server.

$('.selector').on('froalaEditor.file.beforeUpload', function (e, editor, files) {
  // Code....
});

Triggered after the request to upload a file has been completed successfully.

$('.selector').on('froalaEditor.file.inserted', function (e, editor, $file, response) {
  editor.html.insert(" "); //add extra space after successfully file uploaded.
});

Upvotes: 3

Related Questions