Completed adding of customization system and bottom infobar

This commit is contained in:
Caleb James DeLisle
2015-02-02 16:01:33 +01:00
parent 84164123b6
commit 51544db9a2
16 changed files with 189 additions and 31 deletions

View File

@@ -4,10 +4,11 @@ define([
'/common/messages.js',
'/common/crypto.js',
'/bower_components/jquery/dist/jquery.min.js',
'/bower_components/ckeditor/ckeditor.js',
'/customize/pad.js'
], function (Config, RTWysiwyg, Messages, Crypto) {
var Ckeditor = window.CKEDITOR;
var $ = window.jQuery;
var ifrw = $('#pad-iframe')[0].contentWindow;
var Ckeditor = ifrw.CKEDITOR;
$(function () {
$(window).on('hashchange', function() {
@@ -20,17 +21,19 @@ define([
var key = Crypto.parseKey(window.location.hash.substring(1));
var editor = Ckeditor.replace('editor1', {
removeButtons: 'Source,Maximize',
// This plugin inserts html crap into the document which is not part of the document
// itself and causes problems when it's sent across the wire and reflected back.
removePlugins: 'magicline'
// magicline plugin inserts html crap into the document which is not part of the
// document itself and causes problems when it's sent across the wire and reflected back
removePlugins: 'magicline,resize'
});
editor.on('instanceReady', function () {
editor.execCommand('maximize');
var ifr = window.ifr = $('iframe')[0];
ifr.contentDocument.body.innerHTML = Messages.initialState;
// (contenteditable) iframe in an iframe
ifrw.$('iframe')[0].contentDocument.body.innerHTML = Messages.initialState;
var rtw =
RTWysiwyg.start(Config.websocketURL,
RTWysiwyg.start(ifrw,
Config.websocketURL,
Crypto.rand64(8),
key.channel,
key.cryptKey);