Your comments

This is probably not that easy to implement, but it would certainly benefit a lot of users. I'll consider it for future updates.

Yes, another user had the same problem when running the Baidu input Jailbreak utility.

Thank you, Jonathan!

Oh, and for new templates to be picked up by Textastic, you do not need to restart the app. It's sufficient to just add a new file and select the template.

Ah, ok. My answer above was for adding syntax highlighting support for .mxml files. I didn't realize you wanted to add a template.


You need to json-encode the snippet string. So in your case, you need to escape the quote characters and newlines. 


Replace " with \" and newlines with \n


It would something like this:


snippet = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<s:WindowedApplication xmlns:fx=\"http://ns.adobe.com/mxml/2009\" \n                       xmlns:s=\"library://ns.adobe.com/flex/spark\" \n                       xmlns:mx=\"library://ns.adobe.com/flex/m\""



What exactly does not work?