+1
Fixed

Local preview bug: new standards SVG + XHTML still not rendered

Martin 10 years ago updated by Alexander Blach (Developer) 10 years ago 10
SVG and XHTML preview is rendered, but in HTML mode -> no graphic :-(

For example common iOS file manager GOODREADER renders every SVG file 100% correct.

I think ...all about this bug may be in relation with something similar like MIME type on web servers... If you do not set correct MIME for given file type e.g. ".SVG" or ".XHTM"... rendering in browsers FAIL.

By my opinion solution should be relatively easy.... if you correctly set file type / rendering mode / for the rendering engine of Webkit... many thanks for help in advance...

Answer

Answer
Fixed
Fixed for Textastic 2.1.
PS: at begin... preview button for .SVG files is hidden?! ...when user manually changes file type to XML, preview is possible... but incorrect.
Thanks, I tried one of the sample files and see what you mean. The problem is that I haven't found a way to set the MIME type for the UIWebView and still have it recognize relative files (like css and images).

My workaround was to add a "html" extension to the file as UIWebView seems to interpret the file extension. I thought, it would recognize SVG files by their content, but it doesn't.

So, right now I don't know how I can set the correct mime type for SVG files without breaking the preview function for normal html files with css and images files relative to them... :(
Unfortunately, I do not know Apple API, so I can't help :-(

I have 1 idea: What if you create wrapper of some kind for problematic files? (there is also problem with .XHTM, .XHTML...)

For example empty page with <iframe> of 100% size? ;-)
I'll try to find a workaround!
PS: I think SVG ang XHTML with mixed namespaces should have priority for every web dev. app... as these are part of current web standard...

...also I am currently developing huge web app based on SVG, so it is very important for me ;-)

PPS: I still thinking about GOODREADER, which renders everything with no problem... SVG, HTML...

And...thanks for your great work!
While I could reproduce the problem with SVG files, the preview of the XHTML files I tried worked flawlessly. (I just tried this again)

Can you please send me an XHTML file that doesn't work for you to support*at*textasticapp.com or tell me a URL?
Thanks for mailing the example file. I could reproduce the problem and will try to solve it for the next update.
Just wanted to add that editing SVG files (with javascript) is the primary reason I bought Textastic, so any help in this area would be appreciated. As Martin mentioned, Textastic -> Goodreader does work (even with interactive SVG files using mouse and touch events etc) but isn't ideal when you are doing it all day. Thanks for a great product and keep up the great work!
I'll fix this in the next update. I can confirm that Good Reader renders it correctly while Textastic doesn't at the moment.
Answer
Fixed
Fixed for Textastic 2.1.