Replace initialState by a placeholder in slide and code

This commit is contained in:
yflory
2017-02-03 18:45:30 +01:00
parent 87abfac5e0
commit fbbf8a2829
7 changed files with 457 additions and 419 deletions

View File

@@ -68,6 +68,7 @@ define([
mode: "javascript",
readOnly: true
});
editor.setOption('placeholder', Messages.codeInitialState);
var setMode = module.setMode = function (mode, $select) {
module.highlightMode = mode;
@@ -83,7 +84,7 @@ define([
}
};
editor.setValue(Messages.codeInitialState); // HERE
editor.setValue('');
var setTheme = module.setTheme = (function () {
var path = '/common/theme/';
@@ -148,7 +149,6 @@ define([
};
var config = {
//initialState: Messages.codeInitialState,
initialState: '{}',
websocketURL: Cryptpad.getWebsocketURL(),
channel: secret.channel,
@@ -570,7 +570,7 @@ define([
// Update the user list (metadata) from the hyperjson
updateMetadata(userDoc);
editor.setValue(newDoc || Messages.codeInitialState);
editor.setValue(newDoc || '');
if (Visible.isSupported()) {
Visible.onChange(function (yes) {