Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro How to ensure only PLAINTEXT is copied, excluding the style?

Discussion in 'UGUI & TextMesh Pro' started by MrLucid72, Sep 23, 2020.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    upload_2020-9-23_21-27-30.png

    Above, if you copy "the Paladin", this is what will actually copy:

    Code (CSharp):
    1. "the <style=paladin>Paladin</style>"
    This is not good: How to make them PLAINTEXT copy (strip rich tags on copy)? Expected:

    Code (CSharp):
    1. "the Paladin"
    Suggestion 1:
    [ ] Add a checkbox for "strip rich text on copy"

    Suggestion 2 (would love to see this in addition to 1 above):
    Add:
    1. txt.stripRichText() void // Removes from the txt itself
    2. txt.getPlaintext() str // Gets the stripped str without altering the txt itself
     

    Attached Files:

    Last edited: Sep 24, 2020
  2. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962