Flex TextArea - copy/paste from Word - Invalid unicode characters on xml parsing

后端 未结 1 1965
夕颜
夕颜 2021-01-16 15:38

EDIT:

Please visit here:

Flex textArea remove/replace invalid little squares

Seems to be the issue & need to find a solution for this.

OR

1条回答
  •  北海茫月
    2021-01-16 15:59

    I was able to handle it by using the textArea changingHandler to allow only certain characters:

    if (event.operation is PasteOperation)
        {
            event.preventDefault();
            var txt:String = Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT).
                            toString().replace(/[^A-Za-z0-9\s$%&*!@-_().]/ig, "");
                 ......
        }
    

    0 讨论(0)
提交回复
热议问题