How can I search in an UIWebView? - iphone

I need to perform search in an html page displayed in a UIWebView control. The functionality I need is something that Safari has, when you hit command/ctrl F for searching the document for some word and the program highlights the hits for you. Is there any easy solution for this problem?

I know it's been a long time since you asked this question, but it's still a pretty common question people have so I put together a sample project in case anyone else is asking the same question. The project is a super simple app that loads an HTML file and can search and highlight any keyword. You can download the sample project here:
https://www.dropbox.com/s/jietctrvrtnec28/TheSearcher.zip?dl=0
Scott
Edit: changed link above as the old one had broken.

You could do this with javascript. Check out the "Find in this page" bookmarklet:
http://www.lifeclever.com/17-powerful-bookmarklets-for-your-iphone/
Something like that, combined with:
http://developer.apple.com/iphone/library/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instm/UIWebView/stringByEvaluatingJavaScriptFromString:
might do the trick.

Related

Is there an easy way to search Snippets in SQL Developer?

I find that my collection of snippets has grown far beyond what can be managed by assigning a Category and Name. "I know I wrote this code before, it's probably in one of these three categories but it definitely hit table T and used function F; should my time be spent clicking thru each likely category and dragging out each snippet, reinventing it, or searching the snippets.xml?" is a conversation I have with myself far too often.
I tend to copy the snippet body into the tag so I can hover and see some of what's in there but still, being able to actually search the snippets (like we can do with SQL History) would be amazing. Is there a way?
No, there is no way today.
I'm happy to log an enhancement request on your behalf for that feature.
In the meantime, maybe consider trying the Code Templates instead?
You can 'search' either by the name of your code template, or by the first word of the code template 'source'
type the word, and then ctrl+enter to bring up the list of 'hits'

How to include html when searching with "inspect elements"?

Ok, this seems simple but I've been scratching my head over this.
When I go to "inspect elements", and I see this (for example):
<div class="topbar">
I can use search to find "topbar", but not the whole thing (with the ">").
Is there some simple way to search for all text, including the html part, using google chrome's devtools?
A quick way to try and work around this is to use the selector, in this case .topbar when searching. It appears that currently the string selection only searches content text, not the DOM structure.
If you want to see if the search can get updated we always welcome new bug reports. The DevTools group doesn't mind feature requests through this system. Please have "DevTools" in the title so it is easy for any triager to know where to send it.

Include vanilla file in Wicket?

It would be useful to be able to include some vanilla text files, containing simple scripts (with no HTML-relevant content), in an HTML page in my Wicket portal. There's no end to support for .css and .js, but I would just like to drop simple text inside a
<pre>
...
</pre>
paragraph so that I don't have to keep copying and pasting when these change. Or, am I in too much of a hurry and have asked the wrong question?
Profuse thanks for any and all comments.
Later, ...
The answer I got triggered it for me. It was just what I needed. Unfamiliar as I am with Wicket, this was pretty much over my head. However, thanks to the marvel of Google and a more knowledgeable friend, I was able to get this going. A pretty thorough description of my complete solution can be found at http://www.javahotchocolate.com/notes/wicket.html. Thanks to Nicktar!
Just give your pre-tag a wicket-id and fill it with a Label, setting EscapeModelStrings to false for the Label...

Access to hyperlink in a pdf(iPhone)?

I am working on a small app, which can open a pdf. My question is, if it is possible to access a hyperlink from a pdf? Because when am trying to click on hyperlink nothing is happening and it's not redirecting me to the link. I tried searching a lot but didn't got any luck on this. Am expecting a quick response as my work is getting delayed because of this issue. If it's possible then what would be the approach? Right now am using UIWebView to open the pdf. Any sample app or code will be of great help.
Thanks for your time .
The only way I know is to use a third party library (or perhaps parse the PDF yourself), find the links, get their rects and catch user taps and compare that to the list of link/hyperlinks/gotos for that particular page.
Unfortunatelly - nothing in the SDK that can help. You can search for a opensource pdf library, like muPDF for instance.
There is a reason why not many applications have that functionality :D

How to integrate TinyMce with Zend Framework with Gzipping and Image managers?

I have done some research on this subject, and found out, that Gzipping and adding a new image manager through a plugin would not be as difficult. The only question is the Image manager.
I have seen some quite good ones, like the Image Manager for JCE, which is a Joomla wysiwyg editor, but none for TinyMce for itself.
Could someone show me a good image plugin?
P.S. SwampyFoot is out of question, as it's download links are broken, and PhP Letters Ajax image manager is quite hard to install.
Thanks!
EDIT: I just found Mad File Manager, which seems to work excelently except for a little glitch: An image can be uploaded, but cant be selected... Thats sad...
EDIT2: I've found KCFinder, which seems to be very promising, but I just can't get it to work properly. Somehow, the configuration is quite difficult.
Ok, So I have been able to answer my question myself. So here it goes:
Set up TinyMce with Sozfo solution. The important ting to remember here is, instead of extending your Forms from Zend_Form, you have to extend them from Sozfo_Form. As to the defining your own extendable controller, it didnt work for me, So I put the path defining helpers in my Bootstrap. And if the whole ordeal works, there is a textarea that should have TinyMCE controls, but there aren't any, try checking the comments at Sozfo, or checking if the page is cached or not. It took me a good hour, to find out, that the only reason why no JavaScript was pushed to the header was because of a very persistent cache.
Set up KCFinder. The main problems I faced here were due to wrong paths to corresponding files. When the paths were correct, the only thing to remember is to enable it. There is a boolean to change in configuration file.
The last issue was adding the KCFinder to my Tinymce, and what I ended up doing was, I added the function needed to call KCFinder in TinyMCE.php View helper. ( Due to some glitch I seem to be unable to post the code here). Once you have set up your paths correctly, everything should work splendidly.
All in all, it took me about 3 days to figure this whole thing out. Talk about steep learning curve...
Have you looked at MCImageManager - its not free but its an option if you're happy to pay for it
Not really a suggest as you've got it but swampy foot download does work
As you're already using zend framework, why not use dojo, set up the dojo form and call the editor element and integrate this http://docs.dojocampus.org/dijit/_editor/plugins/LinkDialog into it?