You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cryptpad/www/pad/mediatag-plugin.js

46 lines
1.2 KiB
JavaScript

( function() {
CKEDITOR.plugins.add( 'mediatag', {
requires: 'dialog,widget',
//icons: 'image',
//hidpi: true,
onLoad: function () {
CKEDITOR.addCss(
'media-tag{' +
'display:inline-block;' +
'}' +
'media-tag.selected{' +
'border: 1px solid black;' +
'}' +
'media-tag iframe{' +
'border: 6px solid #eee;' +
'}' +
'media-tag img{' +
'vertical-align: top;' +
'}' +
'media-tag *{' +
'width:100%; height:100%;' +
'}');
},
init: function( editor ) {
var pluginName = 'mediatag';
// Register the dialog.
CKEDITOR.dialog.add( pluginName, this.path + 'mediatag-plugin-dialog.js' );
editor.widgets.add( 'mediatag', {
getLabel: function () { return " "; },
dialog: pluginName,
inline: true,
upcast: function( element ) {
return element.name === 'media-tag';
}
});
},
} );
} )();