/teletext-editor

An in-browser editor for teletext frames.

Primary LanguageHTMLGNU General Public License v3.0GPL-3.0

teletext-editor

This is a teletext editor implemented in JavaScript, so that people now need no more than a JavaScript-enabled browser in order to create their own teletext frames. It was written for the teletext40 project and you can try the editor out at http://editor.teletext40.com/ - however, it also works as a general-purpose editor.

Most of the functionality of the editor is accessed through key sequences beginning with the escape key. They are summarised in a table to the right of the the editor. Pressing the escape key takes you into command mode, in which the status bar is coloured yellow, and then typing a (possibly shifted) letter will insert a control character or perform some other function.

The data is in the URL

Everything is in the HTML file. There are no external dependencies and no communication happens with any backend or 'cloud server'. Instead, the state of the frame is 'saved' into the URL. Therefore, to save your work, you can bookmark the URL in your browser. To share it, you can email the URL to others. The server logs don't store this data, even when somebody clicks on a link containing it, so your frames are private.

In the URL, the nybble before the colon describes the character set the page is encoded in (least significant three bytes) and whether the page is intended to be rendered with black foreground colours enabled (the most significant bit enabled if it is). The part of the URL after the colon contains a base-64-encoded sequence of bits, amounting to 1120 base 64 digits. The encoding is standard 'base64url' with URL and Filename Safe Alphabet (RFC 4648 §5 'Table 2: The "URL and Filename safe" Base 64 Alphabet'). After decoding, the seven-bit character code for column c and row r appears at bit positions 280r+7c to 280r+7c+6 inclusive, the most significant bit appearing first. Contributions of scripts to convert these URLs to formats required by other teletext systems would be very welcome.

Licensing and support

The source code is commented throughout and licenced under the GNU General Public Licence v3.0, with additional requirements concerning minimisation of the source code. See the notice for more details. Bug reports and pull requests are welcome. If you would like to contribute but cannot program, documentation and tutorials would be very welcome. If you're interested, please comment on issue #3.

For IRC support, try the channel ##teletext on Freenode. If you don't have an IRC client installed, it may be more convenient to chat using your browser.

Related links