0

I use this link to get content of the page but it is not in proper format, like no table borders, some background color for text.

https://en.wikipedia.org/w/index.php?action=render&title=Pakistan

How can I show above URL with proper format in uiwebview iOS, just like the wikipanion app.

Nemo
  • 2,441
  • 2
  • 29
  • 63
user777304
  • 455
  • 2
  • 9
  • 24
  • If you look at the source code this URL delivers, it’s not a full document, but only the content part – so there is no CSS etc. embedded. If you want something else, chose something else: http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Actions – CBroe Mar 26 '13 at 09:47
  • @CBroe ok no CSS... So if I found or make CSS, then How can I use my CSS with this url in UIwebView.. do your know any CSS for this. Or suggest me other page method to show on my uiwebview – user777304 Mar 26 '13 at 09:52

1 Answers1

0

Look at how Kiwix, the experts of MediaWiki offline/exported content, do it: mwoffliner.js just downloads the CSS separately :

var downloadCSSQueue = async.queue( function ( link, finished ) {

/* link might be a 'link' DOM node or an URL */
var cssUrl = typeof link == 'object' ? getFullUrl( link.getAttribute( 'href' ) ) : link;
var linkMedia = typeof link == 'object' ? link.getAttribute( 'media' ) : null;

etc. etc. It's not a simple task, make sure it's really the path you want to take for your goal.

Nemo
  • 2,441
  • 2
  • 29
  • 63