Your comments
"document.writeln" only creates line breaks in the source code. The browser translates line breaks to spaces if it is not within a <pre> tag. I guess that's the reason why you don't see the line breaks in the browser window. Try to use document.writeln to write contents inside a <pre> tag and you should see line breaks.
You need to add a <br/> tag if you want to see line breaks in the interpreted code.
Also have a look at the answers to these Stackoverflow questions:
http://stackoverflow.com/questions/10247207/why-writeln-not-producing-a-new-line
http://stackoverflow.com/questions/5795843/document-writeln-doesnt-write-to-a-new-line
Do you know that you can tap on the action button and then on "Copy generated HTML" to copy the html code?
You can already install custom themes: http://www.textasticapp.com/mac/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html
You can use the theme editor at http://tmtheme-editor.herokuapp.com/ in Google Chrome on a desktop computer to edit and download many themes.
Can you please send me the file you saved with PSPad so I can try to reproduce it? You can add it as an attachment here or send it to support@textasticapp.com - thanks!
This seems to happen on some machines when you change the syntax definition after saving it for the first time. If it happens, you need to close the file and open it again.
To prevent it from happening, please set the syntax definition from the status bar before saving a new file for the first time.
I hope to fix this in the next release. I still need to find out why exactly it happens. On my own machine, it happens in one user account but doesn't happen in another one. It also seems to be related to iCloud.
If iCloud is enabled in your Mac's settings, it will be used to store new, untitled, unsaved files. This is the default system behavior. As soon as you save a file to a location outside of iCloud, iCloud won't be used anymore for this file.
The iOS versions don't support iCloud yet, but the behavior will be different there when I add support for iCloud in the next release: If you add a new file in Textastic on iOS, you choose the location before the file is created.
Currently, you can't. I'll consider adding a switch to disable AutoSave. Since Versions and iCloud depend on AutoSave, these features will also be disabled if you disable AutoSave.
The problem is this: your getElementById call is firing immediately, as soon as your JavaScript execution environment is set up, but before the DOM is built, so it returns a null object since the output div doesn't exist yet. You should get the alert though.
There are two ways to solve this: You need to either put the code in a function and use the onload event (either <body onload=...> or window.onload in JavaScript), or you could just put the script tag at the end of the body section instead of in the head section of the html file.
I solved it like this:
script.js:
alert("alert");
window.onload = function (){
document.getElementById('output').innerHTML = "test";
}
index.html:
<html>
<head>
<title>JavaScript Test</title>
<script src="script.js"></script>
</head>
<body>
<div id="output">This text will be replaced by Javascript.</div>
</body>
</html>
Customer support service by UserEcho