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
Characters stripped when pasted into tinymce #3480
Comments
It actually strips off any value prior to the |
I've seen the above in version 4.7.2, but cannot reproduce on the website front page. What plug-ins are active on the front page so that we can see if one of them fixes it? |
I've just observed this behavior when using the TinyMCE Advanced plugin (v4.7.11) on a WordPress site (v4.9.13). No other WordPress plugins that should affect the editor are active. |
I suspect this is where the error lies. There's no code to say, "Oh, we see that this was an unordered bulleted list, so we don't need to also see if this is a numeric bulleted list." |
Marking as verified as we can replicate this in 5.5. And, from a quick glance, I think you're right @tvanantwerp. Thanks for tracking that down! |
Fixes tinymce#2810, Fixes tinymce#3017, Fixes tinymce#3480, Fixes tinymce#5474 This commit includes fixes to multiple subtle errors in MS Word list cleanups. The bugs caused any characters ending with a dot to disappear from the lists under certain circumstances: Font/style -changes cause multiple text nodes to appear as siblings in the AST. Function filterStyles marked only the first node with _listIgnore and thus missed the nodes with roman numerals. This was fixed. The removeIgnoredNodes-function used node.remove() to delete nodes from the AST. The method sets node.next to null and thus recursion did not proceed further. Sibling text nodes with _listIgnore would not be deleted. This was fixed by avoiding node.remove(). The trimListStart -function did not trim the beginning of the paragraph. It trimmed all text nodes instead and removed the ones with words ending with dot. This was fixed by mering the paragraph text nodes before trimming the first text node. Regex for cleaning up the beginning is now safe. It no longer removes any letters (with \w). Instead it only looks for certain bullets. One regex is enough to filter those as the text nodes have been merged before matching. Added a couple of test cases as a proof that the fixes work correctly.
Fixes tinymce#2810, Fixes tinymce#3017, Fixes tinymce#3480, Fixes tinymce#5474 This commit includes fixes to multiple subtle errors in MS Word list cleanups. The bugs caused any characters ending with a dot to disappear from the lists under certain circumstances: Font/style -changes cause multiple text nodes to appear as siblings in the AST. Function filterStyles marked only the first node with _listIgnore and thus missed the nodes with roman numerals. This was fixed. The removeIgnoredNodes-function used node.remove() to delete nodes from the AST. The method sets node.next to null and thus recursion did not proceed further. Sibling text nodes with _listIgnore would not be deleted. This was fixed by avoiding node.remove(). The trimListStart -function did not trim the beginning of the paragraph. It trimmed all text nodes instead and removed the ones with words ending with dot. This was fixed by mering the paragraph text nodes before trimming the first text node. Regex for cleaning up the beginning is now safe. It no longer removes any letters (with \w). Instead it only looks for certain bullets. One regex is enough to filter those as the text nodes have been merged before matching. Added a couple of test cases as a proof that the fixes work correctly.
Fixes tinymce#2810, Fixes tinymce#3017, Fixes tinymce#3480, Fixes tinymce#5474 This commit includes fixes to multiple subtle errors in MS Word list cleanups. The bugs caused any characters ending with a dot to disappear from the lists under certain circumstances: Font/style -changes cause multiple text nodes to appear as siblings in the AST. Function filterStyles marked only the first node with _listIgnore and thus missed the nodes with roman numerals. This was fixed. The removeIgnoredNodes-function used node.remove() to delete nodes from the AST. The method sets node.next to null and thus recursion did not proceed further. Sibling text nodes with _listIgnore would not be deleted. This was fixed by avoiding node.remove(). The trimListStart -function did not trim the beginning of the paragraph. It trimmed all text nodes instead and removed the ones with words ending with dot. This was fixed by mering the paragraph text nodes before trimming the first text node. Regex for cleaning up the beginning is now safe. It no longer removes any letters (with \w). Instead it only looks for certain bullets. One regex is enough to filter those as the text nodes have been merged before matching. Added a couple of test cases as a proof that the fixes work correctly.
We have found a bug relating to bullet points and decimal point numbers when pasting content into the TinyMCE editor.
If a bullet point is created in MS Word, and the value of 0.25 is written, eg:
Then you copy this, and paste into the TinyMCE editor, the editor strips the "0." from what is pasted.
For an example, see attached image :
When you paste this content, it should retain the full content without stripping any characters.
The text was updated successfully, but these errors were encountered: