when using UIWebview and dropdown, ios7 picker doesn't wrap the text. - ios

I have an application that uses Webview in iOS7. I was wondering if there is anyway via CSS or HTML to tell the picker to wrap the text instead of showing "...". iOS 6 would wrap the text but in IOS 7 the text gets ... after 25 characters.
Thanks,
Faraz

I fear that's not possible.
The Webkit used in the UIWebview uses the same UIPickerView as native apps, and there's no way to customise it via CSS nor JS etc.
It looks like the ellipsis it adds in the text is the new behaviour of UIPickerView itself in iOS7.
If you really need to customise the picker, you should implement one in HTML, CSS, JS etc, by yourself.
If think it worth the effort, you should also take a look at Sencha Touch's picker.

Related

How do I create an in-line picker for iOS for non-date/time values

Similar to Inline UIPickerView in a table but more focused on React Native and Expo and I am looking at it from the point of view of a tablet.
In React Native Community DateTimePicker it provides an in-line input of a time
However, they don't provide a similar function for non-time based pickers or at least I can't find it. Is such a component not available in iOS because I can't seem to find something that behaves similarly where if you tap to show the picker and it starts editing the "original" disappears and places the field close to where it originally is.
I want it in-line as in a tablet the width is much larger so it does not make sense to do the style as shown in the HIG as it is for a phone form factor.
react-native-dropdown-picker is another one I tried to take a look at but it does not match what I would expect from the OS controls.

Rich Text Editor for iOS

My users have asked if I can add a Rich Text type editor to my app. The field that they want this added to is a UITextView.
Obviously, they also will want to see the text displayed as they've entered it.
Any suggestions for how to implement this is greatly appreciated.
There are 2 approaches - a UiTexView can handle most Rich Text Editor stuff not including lists.
The 2nd way is a WebView and some html / JavaScript.
A WebView might be the best approach but be careful - some of the WebView based solutions out there were rejected from the AppStore since they use private methods of the WebView - that is not allowed by Apple.

iOS 8 WKWebView: display local plain text like iOS 9?

I'm attempting to view a local log file using a WKWebView, due it's higher performance and asynchronous loading vs. UITextView. On iOS 9, the loadFileURL(_:allowingReadAccessToURL:) works perfectly to load the plain text file and display it. It even renders with a monospaced font (I wish I could set it to Menlo though). However, on iOS 8, local file URLs can't be loaded but I can load the text file as a String and use loadHTMLString(_:baseURL:) to load it into the view. This works, but the text is rendered, as expected, as if it was HTML. That means there are no line breaks or appropriate wrapping for long lines. It also renders with the default font, which is not monospaced.
I'm guessing I could attempt to load some JavaScript that loads some styling, but I have no experience with that and I'm hesitant to put that much effort into what's essentially debug log viewer.
So my question is, how can I render plain text as plain text, from a local file, using WKWebView on iOS 8?

Double clicking on a div with contenteditable inside and iframe disables div

If i create a div that has contenteditable true inside of an iframe and if you double click it it becomes non functional.the focus is still in the iframe and you can see the cursor, however it does not respond to keydown
Does anyone have an idea of how I can i overcome this?
EDIT:
i have implemented a dojo editor. if you open this link in ipad you will see the problem as described above.
Which OS you are using? You should make sure that you are using OS 5.0 or later. According to the (Apple's Technical Notes) and Safari Web Content Guide. It is written:
The HTML contenteditable attribute is supported in iOS 5.0 and later. In earlier versions, replace contenteditable, used to enable text input within a styled element, with a styled textarea element. In Safari, you can customize the appearance of textarea elements using CSS. If necessary, you can even disable any platform-specific, built-in styling on a textarea element by setting -webkit-appearance to none.
So, if you are using an old OS version, you could use textarea elements instead of contenteditable. Then, it is guaranteed that your application will work as well.
PS. you can use your IPAD to go on this website, to try how does it work with textarea. It might be an example for you.
Hope that helps.
Trying to get a contenteditable div to work inside of an iframe is one level of complicated, if you are trying to get it to work inside of a specific WYSIWYG editor like Dojo editor, is another level harder, as there is a lot of JavaScript affecting the interactions. It would help to explain the parameters a little better in your question.
Have you used a browser debugger (like Firebug) to see what's happening when you click?
This other SO question and answer about contenteditable div vs iframe is useful.
Finally, if you are using iOS Safari, make sure you are using Safari 5.0 or better as the contenteditable attribute was only recently supported on that browser.
EDIT:
Since you are using iOS 6, you should be using the iOS Safari JavaScript Debugger to let you know what's happening a little more clearly when you click on the editable div. If you can find some more specific error messages, please update us.

Phonegap iOS Plugin for UITextView?

I am trying to find a Text view / editor for Phonegap iOS Application.
Basically I am expecting it to be looking like
with a custom header. So my question is that can I just inherit the UITextView portion from the plugin if there is any and still use my customized header of my HTML?
This is a Notes app that I am creating to make which requires this. I tried using regular jQuery, Html, CSS for this but it starts jumping all over when I enter text.

Resources