froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.27k stars 673 forks source link

fr-data-linked not removed in some cases #3595

Open rogeru opened 5 years ago

rogeru commented 5 years ago

If you have a feature suggestion, please add it on the Feature List instead.

Expected behavior.

fr-data-linked attribute is removed for links consistently.

Actual behavior.

fr-data-linked attribute is removed sometimes.

Steps to reproduce the problem.

Use any froala editor, e.g. even the newest one at https://www.froala.com/wysiwyg-editor/examples/full-featured

Enter "http://abc.com http://cnn.com" and view the html generated. First link has data-fr-linked removed, second link does not.

image

Editor version.

2.9.5

OS.

Any (mac)

Browser.

Chrome

Recording.

n/a

rogeru commented 5 years ago

Suggested fix is to also add:

var $link = $(node.parentNode).find('a[data-fr-linked]');
$link.removeAttr('data-fr-linked');

in _inlineType function else branch of url plugin.

casualuser commented 5 years ago

Hello,

We tried to reproduce this with actual version 3.0.4 and 2.9.6 here https://www.froala.com/wysiwyg-editor/examples/full-featured https://www.froala.com/wysiwyg-editor/v2.0/examples/full-featured But discovered that fr-data-linked attribute removed every time for all links.

Please create jsfiddle to reproduce this issue and also any screen records with actions sequence highly appreciated.

rogeru commented 5 years ago

Steps as listed above. Straight forward. Here is a video with https://www.froala.com/wysiwyg-editor/v2.0/examples/full-featured https://www.dropbox.com/s/hywpn26xy5jzzhl/froala%20issue%203595.mp4?dl=0

rogeru commented 5 years ago

@casualuser details are listed above with video.