Skip to content

Instantly share code, notes, and snippets.

View evo42's full-sized avatar

Rene Kapusta evo42

View GitHub Profile
@evo42
evo42 / onsnap-editable.htm
Created June 4, 2013 18:24
Aloha Editor: onSnap editable!
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Aloha Editor: onSnap editable!</title>
<style>
body {
font-family: arial;
}
.editable {
@evo42
evo42 / start.html
Created March 13, 2013 10:49
Aloha Editor: create a plugin
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Aloha Editor Example</title>
<!-- load the require.js and jQuery libraries -->
<script type="text/javascript" src="http://cdn.aloha-editor.org/latest/lib/require.js"></script>
<script type="text/javascript" src="http://cdn.aloha-editor.org/latest/lib/vendor/jquery-1.7.2.js"></script>
<!-- load the Aloha Editor core and some plugins -->
@evo42
evo42 / commands-api-example.html
Created August 29, 2012 09:29
Aloha/UI: using Aloha Editor commands API for your own toolbar
<html>
<head>
<link rel="stylesheet" href="http://aloha-editor.org/builds/development/latest/src/css/aloha.css"
type="text/css">
<script src="http://aloha-editor.org/builds/development/latest/src/lib/aloha.js"></script>
</head>
<body>
<button id="bold">Bold</button>
@evo42
evo42 / example.css
Created August 29, 2012 08:10
Aloha/UI: toolbar with fixed position / shown on page load
#alohaContainer {
margin-bottom: 10px;
height: 60px;
}
.aloha-ui-pin {
display: none !important;
}
.aloha-ui-toolbar {
@evo42
evo42 / pnginator.rb
Created August 7, 2012 09:51 — forked from gasman/pnginator.rb
pnginator: pack Javascript into a self-extracting PNG
#!/usr/bin/env ruby -w
# pnginator.rb: pack a .js file into a PNG image with an HTML payload;
# when saved with an .html extension and opened in a browser, the HTML extracts and executes
# the javascript.
# Usage: ruby pnginator.rb input.js output.png.html
# By Gasman <http://matt.west.co.tt/>
# from an original idea by Daeken: http://daeken.com/superpacking-js-demos
@evo42
evo42 / observer.md
Created August 3, 2012 10:29 — forked from lloyd/observer.md
BrowserID Observer API

BrowserID "Observer" API

The BrowserID JavaScript API can be used by web pages to implement BrowserID authentication. Implementing BrowserID support consists of:

  1. registering callback functions that will be invoked when the user logs in or out via navigator.id.watch()
  2. invoking navigator.id.request() when the user clicks a login button on your site.
  3. invoking navigator.id.logout() when the user clicks a logout button on your site.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@evo42
evo42 / gist:2575073
Created May 2, 2012 08:29 — forked from hahmed/gist:1167789
Aloha Text colour plugin sample...
/**
* Text Color Plugin
*/
GENTICS.Aloha.TextColor = new GENTICS.Aloha.Plugin('TextColor');
/**
* Configure the available languages
*/
GENTICS.Aloha.TextColor.languages = ['en', 'ru'];
@evo42
evo42 / ae-dynamicdom.html
Created March 7, 2012 16:12
AE and dynamic DOM
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The Aloha Editor - Dynamic DOM</title>
<style type="text/css">
.editable {
border: 1px dashed gray;
margin: 20px;
}
<head>
<script type="text/javascript">
(function (window, undefined) {
if (window.Aloha === undefined || window.Aloha === null) {
var Aloha = window.Aloha = {};
}
Aloha.settings = {
logLevels: {