开发者

jquery html textarea plugin for ipad

开发者 https://www.devze.com 2023-03-11 03:25 出处:网络
Has anyone found html t开发者_开发知识库extarea plugin that works with iPad? If i use any plug-in to convert textarea to html rich editor, it hides textarea and adds iframe in place of it. When i cli

Has anyone found html t开发者_开发知识库extarea plugin that works with iPad?

If i use any plug-in to convert textarea to html rich editor, it hides textarea and adds iframe in place of it. When i click on iframe in windows i can add/edit text like a textarea. Where as in iPad i click on it it doesn't pop up keyboard as its not a textbox or textarea instead its iframe.

i need it for jquery based chat which can run on both computer and iPad. So i need to allow simple formating of text like bold, italic, font etc.


Mobile Safari in iOS prior to version 5 doesn't support contenteditable or designMode, which is the built-in browser editing functionality that underpins most JavaScript rich text editors. You'll need to find another way, such as drawing your own caret and collecting input in a (possibly off-screen) textarea, which is what Google Docs, ACE and CodeMirror do. This is quite involved though.

Another alternative is the Stack Overflow approach, which uses Markdown in a textarea with formatting buttons.


I just stumbled on MarkItUp, which seems to provide a good fall-back HTML (and BBCode) editing mode for mobile browsers that don't support contenteditable properly yet.

Looks like a good alternative solution if you want to give you mobile users a slightly better experience than just editing raw HTML.

0

精彩评论

暂无评论...
验证码 换一张
取 消