LadyDefile / Wordsmith-DalamudPlugin

Wordsmith is a Dalamud Plugin aiming to make roleplay easier, more convenient, and harder to accidentally "wrong chat" your post.
7 stars 3 forks source link

Not copying complete Paragraph #23

Closed NeatoPurrito closed 1 year ago

NeatoPurrito commented 1 year ago

Sometimes when a long text get's split into multiple segments. It only copies half of the segment when pressing the copy button.

LadyDefile commented 1 year ago

So, this is a known issue with the way Wordsmith wraps text in the text input. Dalamud (and subsequently all plugins) run on ImGui. ImGui doesn't natively support a text input with text wrapping so I have to use hidden marker characters to flag the wrap points in the text so those points can be unwrapped later. Unfortunately, it is possible to type between these marker characters which will cause FFXIV to not allow you to paste the whole text.

The next time this happens, you can verify that this is what is actually happening by pasting into something like Notepad and you should see that it actually copied the segment as two paragraphs. The newline character that creates the paragraph break is a "forbidden character" in FFXIV so it just stops accepting text.

I have been exploring alternate ways to wrap the text or to validate text before copying to the clipboard but I have yet to find a solid answer to the issue yet short of completely rewriting my own, custom text input methods.

If you do paste into another text editor and find that I'm wrong, be sure to let me know. I'll keep this issue open for a week or so just in case but I'm pretty confident it's the known issue.

I'll look into adding some temporary "last resort" measures to prevent those marker characters from making it through.