Here the issue , but the decision was published - it is bypassing the browser, which I try to avoid.
I need to make my site compatible with the iPad and possibly newer androids. I used the old version of FCKEditor (now the CK editor) for my WYSIWYG editors, but this does not work on mobile devices, so I want to change it to plain text space with something like markdowns if it is not supported.
Presumably, this will not work, because mobile devices, as a rule, do not support this property contentEditable, which means that the on-screen keyboard does not appear when you click on it.
How to determine if the browser supports contentEditable? It has been suggested that I just check the div in question with something like mydiv.contentElement === undefinedor something like that, but the div (if it uses it) is built into the FCK editor and buried somewhere in the iframe.
Is there no other way to determine if the browser supports it contentEditableat all?
Just tried this:
var contentEditableSupport = typeof $('<div contenteditable="true">')[0].contentEditable !== 'undefined';
Says "true" on my iPad ... I don't think it should be.
Edit: Returns a string because all attributes are strings ... it's just reading an attribute. How else should I do this?
source
share