Web Text Editor 2
Web Text Editor 2 is a major upgrade of Web Text Editor, a simple web application that allow you to edit ascii files easily through your web browser.
Edit any ascii files as you want!
You can edit .txt, .html, .csv, .xml, .php and any other ascii files through its easy to use interface.
Edit and save your text files straight from your browser!
What’s New!
- Log-In. Now you can protect your files access with Php session var.
- Multiple Groups as Tabs to have even more files well organized.
- Powerful function to retrieve folder content, so it is dead easy to populate the group list.
- Added preview in browser button
Features
- Easy to use and seamless installation
- Can edit any Ascii files, so TXT, XML, HTML and also PHP files
- Xml driven to build the menu items
- You can brand it
Installation
- Unzip the archive file
- Upload the folder ‘application‘ to your server, where you want
- Rename it, if you want
- Edit the ‘list_files.xml’ file inside the ‘application’ folder
Branding
- You can change the logo, by replacing the file ‘logo.png’ inside ‘application‘ folder
- You can change the color of the header and footer, by editing the config section in ‘list_files.xml‘
- You can add the text footer, by editing the config section in ‘list_files.xml’
Here the config section of the xml file:
<!--
The domain of your server
This is important to resolve the absolute url for each files correctly.
-->
<domain>http://www.yourserver.com/</domain>
<!--
The color of the header and footer background
-->
<bgcolor>0x000000</bgcolor>
<!--
The footer text
-->
<footer><![CDATA[<font color="#ff0000">Your</font>
<a href="http://www.google.com/" target="_blank">Footer</a>]]></footer>
</config>
Configuration
Edit the file ‘list_files.xml’ located in ‘application’ folder to add groups and files:
Each Tab is a group of files. It may have two attribute which are:
@rootPath: the relative path of the folder which will contains
the files you want to edit.
@getList: set to 'true' to let the application to read the content
of the rootPath,
so don't add child node to that tab, they will be added by
the application automatically.
leave 'false' to add manually each file.
The following Tab will be populate automatically by the application
according to the folder content specifyed by the attribute @rootPath.
Keep in mind that rootPath must be resolved correctly with the
$baseRoot variable in the php file (moduleTextEditor.php)
-->
<tab label="Group 1" rootPath="xmls/" getList="true">
</tab>
<!--
The following Tab will be populated manually.
-->
<tab label="Group 2" rootPath="xmls/" getList="false">
<!--
Each item must have a relative path to the file (@url) and
a custom name (@name)
The relative path must be resolved correctly with the
$baseRoot variable in the php file (moduleTextEditor.php)
@url attribute is the relative path to your file from the end
of the complete domain.
i.e.:
Your file is located in:
http://www.myserver.com/assets/files/myfile.txt
The @url should be:
assets/files/myfile.txt
-->
<file name="Name 1" url="1.xml" />
<file name="Name 2" url="2.xml" />
<file name="Name 3" url="3.xml" />
</tab>
You can add as many files you want.
PHP settings
The php ‘moduleTextEditor.php’ file try to use the DOCUMENT_ROOT variable to resolve the absolute path of the files.
Unfortunately some server configuration doesn’t have the DOCUMENT_ROOT variable set properly, or if you are using a virtual server to host several domains and subdomains, there will be just one DOCUMENT_ROOT for all the domains.
In these specific situations, or any other which cause wrong behavior of the application, you have to set it up manually by opening the ‘moduleTextEditor.php’ file and editing the very first line of the file, which by default is:
You should set it up something like:
For a quick test you could invoke, through the browser, the php page with the following variable:
If it doesn’t print anything or just a “/”, try the following variable:
If these utilities cannot help, you should contact your server administrator.
Keep in mind that the DOCUMENT_ROOT is the absolute server path to you root domain folder.
Another variable to may find useful is BOM encoding for UTF8 files.
By default it is set to false but you can set it to true if you found some encoding issue on your files after saving.
Permissions
Make sure that all the files you are going to add to the list have read/write permission allowed (chmod 777) and relative parent folders.
Requirements
You need the Flash Player 9 or newer on client side.
You need PHP 4.2 or newer on server side.
The source code in included in the package, which require Flex SDK 3.5




