easy-markdown-editor icon indicating copy to clipboard operation
easy-markdown-editor copied to clipboard

Emojis doesn't work on iOS in Safari

Open liuyiqi1999 opened this issue 3 years ago • 4 comments

Describe the bug Emojis doesn't work on iOS in Safari, just some garbled code. Only happens when typing on iPhone, copied emojis works fine.

To Reproduce Steps to reproduce the behavior:

  1. Build a web app using easymde.
  2. Type in a few emojis.
  3. See error, some garbled code.

Expected behavior Emojis.

Screenshots IMG_6487

** Version information **

  • OS: iOS 15.4 (Chinese Simplified)
  • Browser: Safri
  • EasyMDE version: 2.16.1

Additional context The garbled code shows random Chinese charaters, pain squares or the right emojis. Not sure if it's because my iPhone is in Chinese language.

liuyiqi1999 avatar May 13 '22 09:05 liuyiqi1999

easyMDE = new EasyMDE({
      renderingConfig:{
        singleLineBreaks: false,
      },
      spellChecker: false,
      autofocus: true,
      autosave: {
        enabled: true,
        uniqueId: 'md2pic'
      },
      maxHeight: '20em',
      toolbar: ["bold", "italic", "heading", "horizontal-rule", "|", "quote", "unordered-list", "ordered-list", "|", "link", "image", "table", "|", "clean-block", "fullscreen", "preview", "guide"]);

liuyiqi1999 avatar May 13 '22 09:05 liuyiqi1999

And browsers on macOS (Chrome and Safari tested) works fine.

liuyiqi1999 avatar May 13 '22 09:05 liuyiqi1999

It's possible that the HTML charset is set wrongly, try adding <meta charset="UTF-8"> to the <head> part.

Adding 'help wanted' because I do not own an iOS device to test with.

Ionaru avatar May 22 '22 00:05 Ionaru

This seems to be an issue with CodeMirror 5 on iOS. In CodeMirror 6 it works like expected.

I can paste Emoji's like these into the editor just fine:

🐄🐖🐏🐐🐈‍⬛

It's only an issue when I type them using the keyboard:

image

tinusg avatar Nov 13 '22 13:11 tinusg