Your comments
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>
Hello,
Textastic does execute JavaScript in the preview screen. Maybe I'm missing something, but there is no element with an id of "output" in the html file, so document.getElementById("output") doesn't work. What happens when you add a div element like this: <div id="output"></div>?
Hello, Textastic offers syntax highlighting for many languages including C++, but it doesn't include compilers or interpreters due to restrictions of iOS.
In order to compile and run code, you could transfer the source code file to a computer using an SFTP connection and use an SSH console app like iSSH or Prompt to compile it on the remote machine.
Textastic offers syntax highlighting for many languages including PHP, but it doesn't include compilers or interpreters due to restrictions of iOS.
If you try to preview the php file locally, only the html part will be interpreted by the web view. The PHP part will be ignored.
In order to preview PHP in Textastic, you can upload the file to a test server, open the preview screen, switch from "Local" to "Remote" and enter the remote url of your test server.
Customer support service by UserEcho
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.