Replace mediatag markdown syntax by html. Enable file upload in /code.
This commit is contained in:
@@ -623,11 +623,12 @@ define([
|
||||
onUploaded: function (ev, data) {
|
||||
//var cursor = editor.getCursor();
|
||||
var cleanName = data.name.replace(/[\[\]]/g, '');
|
||||
var text = '';
|
||||
/*if (data.mediatag) {
|
||||
text = '!'+text;
|
||||
}*/
|
||||
editor.replaceSelection(text);
|
||||
//var text = '';
|
||||
var parsed = Cryptpad.parsePadUrl(data.url);
|
||||
var hexFileName = Cryptpad.base64ToHex(parsed.hashData.channel);
|
||||
var src = '/blob/' + hexFileName.slice(0,2) + '/' + hexFileName;
|
||||
var mt = '<media-tag src="' + src + '" data-crypto-key="cryptpad:' + parsed.hashData.key + '"></media-tag>';
|
||||
editor.replaceSelection(mt);
|
||||
}
|
||||
};
|
||||
APP.FM = Cryptpad.createFileManager(fmConfig);
|
||||
|
||||
Reference in New Issue
Block a user