bernhard Posted September 20, 2023 Share Posted September 20, 2023 I'm using frontend editing all the time. Suddenly on my new project when I tried to copy and paste several regular text-field contents: I ended up with markup in my fields: So I always need to hit the edit icon to edit it in the modal which shows the backend inputfield and there I can safely copy&paste like this: Any ideas why this would happen? I'm not sure why I didn't experience this behaviour so far. Maybe it's an update of something? Link to comment Share on other sites More sharing options...
Stefanowitsch Posted September 21, 2023 Share Posted September 21, 2023 I can reproduce this behaviour. It seems if you copy a text from a website and paste it into the frontend editor all the formatting (this means all HTML tags and elements) are also copied. This works fine on regular body fields that allow HTML tags. For example you can just copy & paste entire HTML tables without creating them in the editor from scratch. But when you then copy this text into a field that is set to not allow html tags it results in this kind of mess in the frontend: In the Backend it looks like this: This is because of the Textformatter settings for this headline field. HTML Tags are just rendered as plain text. 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted September 24, 2023 Share Posted September 24, 2023 Does pasting it with Option + Cmd + Shift + V (Mac) / Ctrl + Shift + V (Windows) helps here? 1 Link to comment Share on other sites More sharing options...
bernhard Posted September 24, 2023 Author Share Posted September 24, 2023 Nope. Just tried to paste it into the html field of jsfiddle.net and it pastes just the text without any markup ?♂️ I've created an issue: https://github.com/processwire/processwire-issues/issues/1818 Link to comment Share on other sites More sharing options...
wbmnfktr Posted September 25, 2023 Share Posted September 25, 2023 18 hours ago, bernhard said: it pastes just the text without any markup Wasn't that the goal? I'm confused right now. Or maybe worked too little with frontend editing. Link to comment Share on other sites More sharing options...
bernhard Posted September 25, 2023 Author Share Posted September 25, 2023 Sorry, that was too short ? Nope --> That was the answer to your question if your shortcuts make a difference. Just tried to paste it into the html field of jsfiddle.net and it pastes just the text without any markup --> that was something that I tried on my own after your suggestion to see what is actually stored in my clipboard. But that was nonsense, I think. I thought that jsfiddle might also show all the markup with all the tags when pasting, but it just shows text only. I'm not sure why this happens and what's going on and what is actually stored in the clipboard when copying text from websites, but I think a plain text field should be frontend editable without having to worry about encoded markup ending up in the field ? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now