Displaying HTML in WP7 - html

So I was looking for a way to display HTML in WP7 (binding it to datacontext) and a generous dude here suggested that I use the MPS Toolkit, that provides HTMLViewer and HTMLTextBox components to WP7. so I did and at the beginning it looked great. the html was displayed exactly how I wanted but for some pages it throws the following exception:
The property 'Margin' was not found in type 'Paragraph'
I've been sitting 2 days trying to fix this problem without luck!
I though it was because of some attributes in the xaml but I was wrong, it's something in the html that this library doesn't like.
Does anyone know about a solution for this? or maybe another suggestion for displaying html in wp7 (not webbrowser).
Anything would be REALLY appreciated!

What's wrong with using WebBrowser? All you need is an attached property that will be able to invoke the HTML rendering method (NavigateToString) with the content you pass to it.

Related

visual basic web browser links - perform action in program when clicked

I have a web browser form inside my program, that displays a custom html page. When I click on the link, instead of going to another page, I would like it to do something in the program (tell the program to do something, and give it a variable or 2)
any suggestions? I was thinking maybe something javascript related, but I don't know much about how vb handles things like this
I think what you are trying to do is not possible in vb.
but why do you need a webbrowser showing a custom site..
you could just copy the information from this site into your program, then replacing the links with actions in your program..
Awesomium framework would be one way to do this. (http://www.awesomium.com/)
It lets you use HTML5 and CSS to make UI in .NET and in C++
I know, late answer.

Turn off selected HTML errors in aptana

Is there any way to achieve that in Aptana (v3.0)? I'm posting this because solution for eclipse does not work in Aptana.
It's annoying that Aptana(Eclipse) returns html errors on partial html code. It's obvious that today noone has full page in one file.
It seems that it's know bug and it's going to be fixed in 3.0.5. Is there anything I can do to turn off those annoying warining before 3.0.5 will be released?
You could add custom error message filters or turn off validation for the specific language all together.

How to render basic HTML markup inside a JPanel in Java Swing?

I want to do something really simple like this:
JPanel htmlPanel = new HtmlPanel("<html><body><h1>hello world</h1></body></html>");
I think I had seen code somewhere that did exactly this. What about CSS and JS? Can the JPanel be made to support this easily? Are there libraries somewhere that do what I am asking for?
Check here to see how to add CSS support to your JEditorPane. You will need an HTMLEditorKit.
I do not see why you would need JavaScript support for a JEditorPane. The basic use of it is to render Help pages written in HTML and CSS.
If you need to have the real McCoy embedded into your application, try the Lobo Java Web Browser. Lobo does JavaScript and CSS and is open source 100% Java.
November 2015: The latest fork of the Lobo Browser is Lobo Evolution.
Sounds like you were thinking of the JEditorPane. It can display html from e.g. an URL.
Swing tutorial, Editor panes.
The support for javascript is nonexistent.
You can try out third party components such as flying-saucer, which is a XML/XHTML and CSS 2.1 renderer in pure Java.
In case anyone is still looking for an easy solution to just enable display of HTML-Markup: Use a JLabel and enclose the text in '<html>' and '</html>' (body tag isn't needed).
Have a look at How to Use HTML in Swing Components. I just came across this when looking for an easy way to display data in tables, and it works like a charm.
There was JWebPane, a Java component based on WebKit, but that project seems to have died a long time ago and/or has just gone quiet. Some people are still hoping it will be released, The other one I know of is WebKit for SWT, but it appears to be for Win32 only. :(

quickest way to find broken DIVs

I have a site that is calling a great deal of HTML from a third party source. Trouble is, I think they are returning malformed code to me.
I need a quick way to find additional DIV closures, is this possible?
create a page calling just the provided code then validate it - W3C Validator
Just install View shource chart add on for firefox and u can find the source generated in a formatted manner which is easy to find the unwanted tags..
You can try this:
http://www.tormus.com/en/tools/div_checker
Will find non matching divs for you. Very helpful
Try w3 org validator
While an IDE is not specifically mentioned, I would highly recommend putting the code into an IDE.
In Dreamweaver CS6 you can Validate directly to WC3 from within Dreamweaver. When an error is found you can go directly to that portion of the code and leverage the tools of the IDE.

Flash parser for html

As I was working on this project for a friend of mine who is terrified of changing from HTML to flash, I realized that maybe there could be a bridge between them. So I started working on a flash project that would grab the HTML from his page and parse it to display it in flash. Although I am sure there are resources available for this already, I figured that the experts on SO might be willing to suffer through the logic of one user trying to develop this script.
So basically, I am not asking for an answer, I am asking for some step-by-step direction that could be posted so other people could see the logic behind breaking down this project. I think it would be really useful (not just for me, but for anyone wanting to learn more about objects and oop).
So, much like the thread between primarily Senocular and Rampage, this would be a thread where I would be the student asking the questions in a logical step-by-step manner and someone else (or someones else) could provide guidance.
Let me know if you are interested and I can start by posting what I have already written. We can go from there and I am sure it will prove insightful to anyone who reads it. If no one is interested, or no one has the time or inclination, no problem.
Best wishes,
Jase
Who in their right mind would change from html to flash for displaying a simple website? I don't see the logic behind it, it's more like you are trying too hard. Flash has its function in the web, as well as html does. If it's just for simple displaying, using flash is just the wrong way and won't make your website any better but worse because its loading time will be too long.
Goole Search retrieved these:
HTMLWrapper
Groe.org HTMLParser
There is an article about the 1st on *drawlogic. I think the seconds' home is on sourceforge here.
Thing is, browsers already do a fine job at parsing html code. Having the flash player parse html files not only does away with any accessibility advantage your markup can offer but it also feels like reinventing the wheel. If you need to display html content, leave it to the browser.
Slightly offtopic - Flashpaper can convert most HTML pages into swf format.
Given properly "disciplined" HTML, you can use the XML parser in the player for the basic parsing. Are you really talking about writing an HTML renderer in Flash though? Or just being able to pull information from HTML dynamically?