Texteditor

 

Finally a Texteditor for the Archos 605,705 and probably the 5 too.

I found a way to save a local textfile on the archos with some limitations which will further on be explained. So I decided to make a texteditor in a local html page.

read along for more info and the download...

Text editor for the Archos version 1.0

Copyright (C) 2008 Maurice van Kruchten
(E-mail mauricevankruchten at gmail dot com)
Well finally we can edit some textfiles on the archos and save them. It is however not a perfect solution, but it get's the job done.
NOTE: Only plain text files are supported like html, xml, js, .txt etc

Some imperfections are:

- No copy and paste function available because it is very hard to select text and I didn't find a way around it yet.

- When saving the file you can't change the saving path or the filename. It will always get saved in the dir "Downloads" with filename "default". So you will have to rename and move the file afterwards in the filebrowser of the archos.

- You will have to type in the path and filename of the text file yourself. There is no browsing function.

Some positive news about this editor are:

- There is a find, replace and replace all function. However with the find function the text get's highlighted, but I can't automaticly scroll to it. I am still searching for a solution.

- You can change font, fontcolor, backgroundcolor and fontsize. This is just to create your own layout for editing, it doesn't get saved with the text file.

- There is an xml settings file in the xml folder of this plugin which let's you set your preferences. The xml is documented with comments and can be edited with a plain texteditor like this one.

So enough for the general info let's have some screenshots and detailed explanation.

First the open tab:

As you can see there are two input fields. The first is the File path here you can specify the path to your text file which you want to open.
Note that the forward slashes "/" aren't necessary if you forget them they will be automaticly added.
The default path can be defined in the settings.xml file this will be explained in the end.

The second field File name is your filename.
Note that if you want to open a file in the Texteditor plugin folder where there is also the settings.xml located. You have to leave the File path field empty.
Then in the File name field you have to ad "./" in front.
So ie opening the settings.xml would be done by typing in the following in the File name field "./xml/settings.xml"

The save tab:

It speaks for itself just hit the save button and you get a download dialog. Then just click ok to save the file as default in the Downloads foloder of the archos. Afterwords you can move and rename the file using the archos filebrowser.

The font tab:

Here you can change the layout of the texeditor textfield.
The fonts are presets which are defined in the settings.xml you can expand the list there with any font that the archos suppords and are css correct.
The font size clear enough I think.
BTW for these two you can use the arrow buttons to change the value. The fontsize is also an input fiels so you can also type in your size, but don't forget the "px".
The font and background colors can be in hex format, RGB (RGB(0,0,0) for black) and color names like black, green, red etc.
If you change the colors you have to click on the sample field to get it updated.

The replace tab:

It is actually a find replace function. Just type in what you want to find and what you want to replace with it. If you want only to find something you can leave the replace field blank.
There is still a little problem with this. I can easily highlight the matched find string, but I can't auto scroll to it. If the textfield get his focus again or a mouseover event the highlighted text get's again highlighted. I know this is not perfect, but it will do for now.

The write tab:

Here you can type in your text it is half screen because of the on screen keyboard of the archos.
You can switch to fullscreen by closing the keyboard and below press the button fullscreen. You will now see the following.

The button text will change to splitscreen. Hit it again and you can go back.
Next to it is a button readonly if you press that the text will change to write and you can't enter anymore text in the field. This is for reading your textfile fullscreen and prevent the onscreen keyboard to popup. You can go back by pressing the write button again, but you can also hit the splitscreen and it will then automaticly enter the edit mode again.

Then there are 4 buttons more the find prev, find next, replace and replace all these are offcourse for finding and replacing text provided in the replace tab. Do I have to say more...

The close tab:

Nothing much to say about this just some general info on the plugin and two buttons.
What those buttons will do hmmm let me guess......no I can't figure it out :D

Finaly the settings.xml located in the xml folder and looks like this

<?xml version="1.0" encoding="utf-8" ?>
<settings>
  <global>
    <!--Default folder to open textfiles-->
    <openpath>/Downloads/</openpath>
    <!--Default file to open-->
    <openfile>default</openfile>
    <!--Font choices available to change font you can ad more just put them between font tags.-->
    <font>arial</font>
    <font>sans-serif</font>
    <font>times</font>
    <font>Trebuchet MS</font>
    <font>verdana</font>
  </global>
  <textfield>
    <!--Default font setting for edit field for text file-->
  <fontFamily>times</fontFamily>
  <!--Default pixel size for edit field for text file-->
    <fontSize>20px</fontSize>
    <!--Default font color for edit field for text file-->
    <color>#000000</color>
    <!--Default background color for edit field for text file-->
    <backgroundColor>#f2f2f2</backgroundColor>
  </textfield>
</settings>

As you can see there are comments in the file to explain the different settings.

Well enjoy this little plugin and please feel free to give me feedback on how it can be improved or maybe any bugs.

Known issues:
- sometimes the download will fail it keeps hanging with the popup initiate download, just press cancel and try again. Normally it just works fine but somtimes it does this and I don't know why yet.

Support forum: http://www.unofgadgets.com/viewtopic.php?f=45&t=221&p=1523#p1523

Download the zip file below and extract it in the root of the archos. you can start the editor by opening the Texteditor file in the Texteditor folder through the filebrowser of your archos.

Texteditor.zip

Maurice :cool: