codesnippetspro / code-snippets

Code Snippets WordPress Plugin
https://codesnippets.pro
326 stars 106 forks source link

Editing on Mobile #94

Open hirenshah opened 4 years ago

hirenshah commented 4 years ago

I've found that it's near impossible to use the editor on a mobile phone, even when trying it in desktop mode.

Selecting and copying/pasting isn't possible, and if you manage to get the cursor in the right place to type, you often get duplicates of each character typed.

For anything new, I tend to add it to the functions.php and more it afterwards. For existing code, I have to turn off the snippet, get the code via an export and then do whatever I want to do in the function.php.

I'm guessing there is something odd about the editor and how it works on mobiles.

hirenshah commented 4 years ago

@sheabunge

Any thoughts?

sheabunge commented 2 years ago

Hi @hirenshah, apologies for the delay in responding here. Mobile editing isn't something that I've ever really put a lot of thought into, but it's definitely an area we should improve on.

Currently, we use the CodeMirror library for powering the snippets editor, the same one that WordPress now uses for the built-in code editor. I'll do some digging and see if there's an easy solution to improve mobile support that already exists out there.

It looks like the latest major version does at least, but we might need to wait until WordPress upgrades to do the same seeing as we are now using the built-in scripts where possible.