Disable design mode in readonly pad
parent
ba3430ebb7
commit
e559ef5640
|
@ -848,6 +848,7 @@ function handleClientReady(client, message)
|
||||||
"numConnectedUsers": pad2sessions[padIds.padId].length,
|
"numConnectedUsers": pad2sessions[padIds.padId].length,
|
||||||
"isProPad": false,
|
"isProPad": false,
|
||||||
"readOnlyId": padIds.readOnlyPadId,
|
"readOnlyId": padIds.readOnlyPadId,
|
||||||
|
"readonly": padIds.readonly,
|
||||||
"serverTimestamp": new Date().getTime(),
|
"serverTimestamp": new Date().getTime(),
|
||||||
"globalPadId": message.padId,
|
"globalPadId": message.padId,
|
||||||
"userId": author,
|
"userId": author,
|
||||||
|
|
|
@ -319,11 +319,15 @@ function handshake()
|
||||||
clientVars = obj.data;
|
clientVars = obj.data;
|
||||||
clientVars.userAgent = "Anonymous";
|
clientVars.userAgent = "Anonymous";
|
||||||
clientVars.collab_client_vars.clientAgent = "Anonymous";
|
clientVars.collab_client_vars.clientAgent = "Anonymous";
|
||||||
|
|
||||||
//initalize the pad
|
//initalize the pad
|
||||||
pad._afterHandshake();
|
pad._afterHandshake();
|
||||||
initalized = true;
|
initalized = true;
|
||||||
|
|
||||||
|
padeditor.ace.callWithAce(function (ace) {
|
||||||
|
ace.ace_setEditable(!clientVars.readonly);
|
||||||
|
});
|
||||||
|
|
||||||
// If the LineNumbersDisabled value is set to true then we need to hide the Line Numbers
|
// If the LineNumbersDisabled value is set to true then we need to hide the Line Numbers
|
||||||
if (settings.LineNumbersDisabled == true)
|
if (settings.LineNumbersDisabled == true)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue