|
|
@ -450,11 +450,10 @@ define([
|
|
|
|
framework.setMediaTagEmbedder(function ($mt) {
|
|
|
|
framework.setMediaTagEmbedder(function ($mt) {
|
|
|
|
$mt.attr('contenteditable', 'false');
|
|
|
|
$mt.attr('contenteditable', 'false');
|
|
|
|
//$mt.attr('tabindex', '1');
|
|
|
|
//$mt.attr('tabindex', '1');
|
|
|
|
//editor.insertHtml($mt[0].outerHTML);
|
|
|
|
//MEDIATAG
|
|
|
|
//MEDIATAG editor.insertHtml can be replaced by:
|
|
|
|
|
|
|
|
var element = new window.CKEDITOR.dom.element($mt[0]);
|
|
|
|
var element = new window.CKEDITOR.dom.element($mt[0]);
|
|
|
|
editor.insertElement(element);
|
|
|
|
editor.insertElement(element);
|
|
|
|
editor.widgets.initOn( element, 'mediatag' )
|
|
|
|
editor.widgets.initOn( element, 'mediatag' );
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
framework.setTitleRecommender(function () {
|
|
|
|
framework.setTitleRecommender(function () {
|
|
|
@ -490,7 +489,7 @@ define([
|
|
|
|
// MEDIATAG: Migrate old mediatags to the widget system
|
|
|
|
// MEDIATAG: Migrate old mediatags to the widget system
|
|
|
|
$(inner).find('media-tag:not(.cke_widget_element)').each(function (i, el) {
|
|
|
|
$(inner).find('media-tag:not(.cke_widget_element)').each(function (i, el) {
|
|
|
|
var element = new window.CKEDITOR.dom.element(el);
|
|
|
|
var element = new window.CKEDITOR.dom.element(el);
|
|
|
|
var w = editor.widgets.initOn( element, 'mediatag' )
|
|
|
|
editor.widgets.initOn( element, 'mediatag' );
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
displayMediaTags(framework, inner, mediaTagMap);
|
|
|
|
displayMediaTags(framework, inner, mediaTagMap);
|
|
|
@ -557,11 +556,10 @@ define([
|
|
|
|
var hexFileName = Util.base64ToHex(parsed.hashData.channel);
|
|
|
|
var hexFileName = Util.base64ToHex(parsed.hashData.channel);
|
|
|
|
var src = '/blob/' + hexFileName.slice(0,2) + '/' + hexFileName;
|
|
|
|
var src = '/blob/' + hexFileName.slice(0,2) + '/' + hexFileName;
|
|
|
|
var mt = '<media-tag contenteditable="false" src="' + src + '" data-crypto-key="cryptpad:' + parsed.hashData.key + '" tabindex="1"></media-tag>';
|
|
|
|
var mt = '<media-tag contenteditable="false" src="' + src + '" data-crypto-key="cryptpad:' + parsed.hashData.key + '" tabindex="1"></media-tag>';
|
|
|
|
//editor.insertHtml(mt);
|
|
|
|
// MEDIATAG
|
|
|
|
// MEDIATAG: editor.insertHtml can be replaced by:
|
|
|
|
|
|
|
|
var element = window.CKEDITOR.dom.element.createFromHtml(mt);
|
|
|
|
var element = window.CKEDITOR.dom.element.createFromHtml(mt);
|
|
|
|
editor.insertElement(element);
|
|
|
|
editor.insertElement(element);
|
|
|
|
editor.widgets.initOn( element, 'mediatag' )
|
|
|
|
editor.widgets.initOn( element, 'mediatag' );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
window.APP.FM = framework._.sfCommon.createFileManager(fmConfig);
|
|
|
|
window.APP.FM = framework._.sfCommon.createFileManager(fmConfig);
|
|
|
|