Merge branch 'soon' into fileManager
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
# This is Cryptpad
|
||||
|
||||
There are quite a few realtime editors packed into this installation.
|
||||
Most are prototypes that could use a lot of work.
|
||||
|
||||
All editors make use of Cryptpad's end to end encryption.
|
||||
Some of them have much better UI.
|
||||
|
||||
## /pad/
|
||||
|
||||
Pad is the main feature of Cryptpad. It features a CKEditor for realtime WYSIWYG editing.
|
||||
|
||||
## /code/
|
||||
|
||||
Code has syntax highlighting features.
|
||||
|
||||
## /sheet/
|
||||
|
||||
Sheet is under development. It will feature realtime collaborative spreadsheets.
|
||||
|
||||
## /text/
|
||||
|
||||
Text is a very simple encrypted plain text editor with no highlighting.
|
||||
|
||||
## /render/
|
||||
|
||||
Render takes advantage of the fact that multiple editors can both use the same 'channel' at once.
|
||||
Channel, in this sense, refers to part of the unique hash of a page which groups messages together.
|
||||
If you visit a /text/ and a /render/ page simultaneously, the changes you make in /text/ will be
|
||||
rendered as markdown in /render/. You can't edit in /render/ directly, but it adds value to other
|
||||
editors by allowing a realtime preview of your work.
|
||||
|
||||
## /vdom/
|
||||
|
||||
Vdom is under heavy development, and features an alternative approach to the realtime WYSIWYG
|
||||
editor. It syncs a representation of a virtual-dom instead of syncing the HTML itself. In practice,
|
||||
this means that there are fewer inconsistencies between different browsers' representations of the dom.
|
||||
This makes the codebase much simpler, and eliminates many classes of bugs. It's still far from perfect,
|
||||
but it is quite promising.
|
||||
|
||||
## /hack/
|
||||
|
||||
Hack leaves it to the user to decide whether XSS (Cross site scripting) is a bug or a feature.
|
||||
It exposes a realtime text pad to multiple users, and provides a button which will cause the
|
||||
contents of the pad to be passed to an `eval` call. Anyone with the hash of the page can edit
|
||||
the contents, so make sure you read the code you're about to run. If you can't read it, you
|
||||
probably shouldn't run it. In any case, it might be useful for pair programming or when you want
|
||||
to sketch out and prototype simple demos.
|
||||
|
||||
## Coming soon
|
||||
|
||||
* style
|
||||
- live editing of CSS as applied to some Lorum Ipsum
|
||||
* polyweb
|
||||
- a multi-featured editor which connects to multiple channels at once, for:
|
||||
1. live rendered markdown
|
||||
2. live style editing
|
||||
3. live javascript
|
||||
@@ -686,8 +686,8 @@ define([
|
||||
$loading.append($container);
|
||||
$('body').append($loading);
|
||||
};
|
||||
common.removeLoadingScreen = function () {
|
||||
$('#' + LOADING).fadeOut(750);
|
||||
common.removeLoadingScreen = function (cb) {
|
||||
$('#' + LOADING).fadeOut(750, cb);
|
||||
};
|
||||
common.errorLoadingScreen = function (error) {
|
||||
$('.spinnerContainer').hide();
|
||||
|
||||
@@ -12,16 +12,17 @@ define([
|
||||
//console.log("plaintext");
|
||||
//console.log(body);
|
||||
|
||||
/*
|
||||
0 && Crypt.put(body, function (e, out) {
|
||||
if (e) { return void console.error(e); }
|
||||
if (out) {
|
||||
console.log(out);
|
||||
}
|
||||
});
|
||||
}); */
|
||||
|
||||
var data = {};
|
||||
|
||||
(_ => {
|
||||
(function () {
|
||||
var cyphertext = data.payload = Crypto.encrypt(body, key);
|
||||
console.log("encrypted");
|
||||
console.log(cyphertext);
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<!--
|
||||
|
||||
This file only exists for supporting some old URLs that we're trying not to break.
|
||||
|
||||
Legacy support is tricky.
|
||||
|
||||
:(
|
||||
|
||||
-->
|
||||
<script>
|
||||
(function () {
|
||||
if (/cryptpad\.fr$/i.test(window.location.hostname)) {
|
||||
window.location.hostname = 'old.cryptpad.fr';
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>There's nothing here.</p>
|
||||
<p>You probably want to visit <strong><a href="https://old.cryptpad.fr">old.cryptpad.fr</a></strong></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -62,6 +62,14 @@ define([
|
||||
Cryptpad: Cryptpad,
|
||||
};
|
||||
|
||||
var emitResize = module.emitResize = function () {
|
||||
var cw = $('#pad-iframe')[0].contentWindow;
|
||||
|
||||
var evt = cw.document.createEvent('UIEvents');
|
||||
evt.initUIEvent('resize', true, false, cw, 0);
|
||||
cw.dispatchEvent(evt);
|
||||
};
|
||||
|
||||
var toolbar;
|
||||
|
||||
var isNotMagicLine = function (el) {
|
||||
@@ -630,14 +638,9 @@ define([
|
||||
|
||||
// this should only ever get called once, when the chain syncs
|
||||
var onReady = realtimeOptions.onReady = function (info) {
|
||||
if (!APP.isMaximized) {
|
||||
if (!module.isMaximized) {
|
||||
editor.execCommand('maximize');
|
||||
// We have to call it 3 times in Safari in order to have the editor fully maximized -_-
|
||||
if ((''+window.navigator.vendor).indexOf('Apple') !== -1) {
|
||||
editor.execCommand('maximize');
|
||||
editor.execCommand('maximize');
|
||||
}
|
||||
APP.isMaximized = true;
|
||||
module.isMaximized = true;
|
||||
}
|
||||
|
||||
module.patchText = TextPatcher.create({
|
||||
@@ -664,7 +667,8 @@ define([
|
||||
console.log("Unlocking editor");
|
||||
setEditable(true);
|
||||
initializing = false;
|
||||
Cryptpad.removeLoadingScreen();
|
||||
Cryptpad.removeLoadingScreen(emitResize);
|
||||
|
||||
// Update the toolbar list:
|
||||
// Add the current user in the metadata if he has edit rights
|
||||
if (readOnly) { return; }
|
||||
|
||||
@@ -22,6 +22,9 @@ define([
|
||||
|
||||
var secret = Cryptpad.getSecrets();
|
||||
var readOnly = secret.keys && !secret.keys.editKeyStr;
|
||||
if (!secret.keys) {
|
||||
secret.keys = secret.key;
|
||||
}
|
||||
|
||||
Cryptpad.addLoadingScreen();
|
||||
var onConnectError = function (info) {
|
||||
@@ -361,12 +364,19 @@ define([
|
||||
if (proxy && proxy.version === 1) { return; }
|
||||
console.log("Configuring proxy schema...");
|
||||
|
||||
proxy.info = schema.info;
|
||||
proxy.table = schema.table;
|
||||
proxy.info = proxy.info || schema.info;
|
||||
Object.keys(schema.info).forEach(function (k) {
|
||||
if (!proxy.info[k]) { proxy.info[k] = schema.info[k]; }
|
||||
});
|
||||
|
||||
proxy.table = proxy.table || schema.table;
|
||||
Object.keys(schema.table).forEach(function (k) {
|
||||
if (!proxy.table[k]) { proxy.table[k] = schema.table[k]; }
|
||||
});
|
||||
|
||||
proxy.version = 1;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
@@ -642,7 +652,7 @@ define([
|
||||
suggestName: suggestName
|
||||
},
|
||||
ifrw: window,
|
||||
common: Cryptpad
|
||||
common: Cryptpad,
|
||||
};
|
||||
var toolbar = info.realtime.toolbar = Toolbar.create(APP.$bar, info.myID, info.realtime, info.getLag, userList, config);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user