Skip to content
A simple HTML editor with a JS editor for creating simple webapps using HTML5 and Javascript. Mainly for educational purpose.
HTML JavaScript CSS PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
classes
config
editor
libraries
views
.gitignore
LICENSE
README.md
index.php
register.php

README.md

eduJs

A simple WYSIWYG editor for creating webapps using HTML5 and Javascript. Mainly for educational purposes.

Framework

The editor uses it's own framework to simplify development. It provides an API for all core UI-Elements and all sensors with a firefox API.

Button

button.setText("ABC")

Set the caption of the button as "ABC".

button.onClick(function(){
    doSomething();
});

Event listener, the function is called everytime the button is clicked.

Image

image.setSRC("folder/to/image.jpg")

Set the source of the image, can be a local path or an url.

image.rotate(90)

Rotate an image by a certain angle from the current position.

Input

input.setText("ABC");

Set the text of the input as ABC.

var text = input.getText();

Get the content of an input.

Label

label.setText("ABC");

Set the text of the label as ABC.

Snackbar

showSnackbar("ABC");

Show a small notification at the bottom of the screen with the Text ABC.

Textarea

textArea.addLine("ABC")

Add a line with the text ABC to the bottom of the textarea.

textArea.setText("ABC");

Set the text of the textarea to ABC (linebreaks can be written as \n).

var text = textArea.getText();

Get the complete content of the textarea.

textArea.setEditable(true);

Select wheter the textarea should be editable or not (default is editable).

textArea.clear();

Clear the content of the textarea.

Acceleration

The acceleration sensor measures the acceleration in all three axis (relative to the device). The value is available with and without gravity compensation.

acceleration.start(function(accelerationWithoutGravity, accelerationWithGravity){
    doSomething(accelerationWithoutGravity.x);
});

Start the acceleration sensor, the function is called everytime there is a new value. The acceleration object contain a x,z and z axis.

Light

The light sensor measures the brightness at the light sensor, larger values means brighter.

light.start(function(brightness){
    doSomething(brightness);
});

Start the light sensor, the function is called everytime the brightness changes.

Location

The location module calculates the position by using the mobile-network, wifi and gps.

gps.start(function(lat, lon){
    doSomething(lat);
});

Start the gps, the function is called everytime the position changes.

Orientation

The orientation sensor measures the absolute position of the device in three axis.

orientation.start(function(x,y,z){
    doSomething(x);
});

Start the orientation sensor, the function is called everytime the orientation changes.

Proximity

The proximity sensor measures if it is covered or not (the value is boolean)

proximity.start(function(distance){
    doSomething(distance);
});

Start the proximity sensor, the function is called everytime the proximity changes.

You can’t perform that action at this time.