Closed cwyrwas closed 1 year ago
What browser are you using?
Nevermind, I get it in any browser when I use your exact content. 👍
It seems to only bug out if you highlight towards the end of the content. I can highlight like crazy towards the beginning and it's fine.
I'm using Firefox as my default, but I get the issue in both Safari, Firefox, and Chrome.
I'm glad to see that I'm not crazy! I've been trying to debug this for days now. It's definitely a strange one.
It'll be because of all those text
and hard_break
nodes at the root of the data, they're not valid for the schema and need to be inside paragraph
nodes. Run into that before.
Easiest fix is Select All, Cut, Paste, and Tiptap will restructure it to match the schema.
That fixed it here. Nice one, Jack.
I thought those line breaks looked odd.
I wonder how you got the content into that state to begin with. 🤔
I've only ever run into that when importing external HTML with html-to-prosemirror
. Unfortunately that doesn't follow the schema and will put text nodes at the root if there's text at the root of the original HTML.
THANK YOU!
That was probably my fault. I wrote a migration command to migrate old Wordpress posts/comments into Statamic Entries. It was a huge project which consisted of 10+ years of data. All those hard_breaks must have come from that conversion script since it used the html-to-prosemirror package
For now, I'll just pass along to the company that they can Select All and then paste until I can work out how to clean up the schema that it generates.
You could scan through the output from the renderer and tidy those up, see https://github.com/statamic/cms/issues/7050#issuecomment-1314032292. You'd need to expand on that to cover hard_break
as well.
Great detective work. Closing this one down. 🕵️ 🔎
Awesome, thank you again! You guys rock.
Bug description
When highlighting and editing text using Bard, if I attempt to edit multiple lines, the editor does not maintain the highlighted state. It will frequently attempt to highlight multiple nodes and does not keep the content highlighted.
If I attempt to delete the highlighted text, the editor will restore the text as soon as I click off of the node.
It's a bit difficult to describe this issue, but please check the gif below for a reference:
I've attempted to disable various settings in the Blueprint to no avail.
How to reproduce
Here is the YAML file containing the entry that I'm referring to, but this happens frequently on any entry in this collection:
Here is the Blueprint for the collection:
Environment