Uživatel:Miroslav.gajda/common.js: Porovnání verzí
| Řádek 3: | Řádek 3: | ||
//alert("visual editor"); | //alert("visual editor"); | ||
| − | ve.ui.ParagraphFormatTool = function VeUiParagraphFormatTool( toolGroup, config ) { | + | /*ve.ui.ParagraphFormatTool = function VeUiParagraphFormatTool( toolGroup, config ) { |
ve.ui.FormatTool.call( this, toolGroup, config ); | ve.ui.FormatTool.call( this, toolGroup, config ); | ||
}; | }; | ||
| Řádek 12: | Řádek 12: | ||
ve.ui.ParagraphFormatTool.static.format = { type: 'paragraph' }; | ve.ui.ParagraphFormatTool.static.format = { type: 'paragraph' }; | ||
ve.ui.ParagraphFormatTool.static.commandName = 'paragraph'; | ve.ui.ParagraphFormatTool.static.commandName = 'paragraph'; | ||
| − | ve.ui.toolFactory.register( ve.ui.ParagraphFormatTool ); | + | ve.ui.toolFactory.register( ve.ui.ParagraphFormatTool );*/ |
| − | + | ve.ui.MWSignatureTool = function VeUiMWSignatureTool( toolGroup, config ) { | |
// Parent constructor | // Parent constructor | ||
ve.ui.MWTransclusionDialogTool.call( this, toolGroup, config ); | ve.ui.MWTransclusionDialogTool.call( this, toolGroup, config ); | ||
| Řádek 28: | Řádek 28: | ||
ve.ui.MWSignatureTool.static.commandName = 'signature'; | ve.ui.MWSignatureTool.static.commandName = 'signature'; | ||
| − | + | ve.ui.toolFactory.register( ve.ui.MWSignatureTool ); | |
// Command to insert signature node. | // Command to insert signature node. | ||
| − | ve.ui.commandRegistry.register( | + | /*ve.ui.commandRegistry.register( |
new ve.ui.Command( 'signature', 'content', 'insert', { args: [ [ | new ve.ui.Command( 'signature', 'content', 'insert', { args: [ [ | ||
{ type: 'mwSignature' }, | { type: 'mwSignature' }, | ||
Verze z 7. 12. 2014, 12:08
document.write("ahoj");
mw.hook( 've.activationComplete' ).add(function(){
//alert("visual editor");
/*ve.ui.ParagraphFormatTool = function VeUiParagraphFormatTool( toolGroup, config ) {
ve.ui.FormatTool.call( this, toolGroup, config );
};
OO.inheritClass( ve.ui.ParagraphFormatTool, ve.ui.FormatTool );
ve.ui.ParagraphFormatTool.static.name = 'paragraph';
ve.ui.ParagraphFormatTool.static.group = 'format';
ve.ui.ParagraphFormatTool.static.title = 'Odstavec2';
ve.ui.ParagraphFormatTool.static.format = { type: 'paragraph' };
ve.ui.ParagraphFormatTool.static.commandName = 'paragraph';
ve.ui.toolFactory.register( ve.ui.ParagraphFormatTool );*/
ve.ui.MWSignatureTool = function VeUiMWSignatureTool( toolGroup, config ) {
// Parent constructor
ve.ui.MWTransclusionDialogTool.call( this, toolGroup, config );
};
OO.inheritClass( ve.ui.MWSignatureTool, ve.ui.MWTransclusionDialogTool );
ve.ui.MWSignatureTool.static.name = 'signature';
ve.ui.MWSignatureTool.static.group = 'object';
ve.ui.MWSignatureTool.static.icon = 'signature';
ve.ui.MWSignatureTool.static.title = 'Tvuj podpis';
ve.ui.MWSignatureTool.static.modelClasses = [ ve.dm.MWSignatureNode ];
// Link the tool to the command defined below
ve.ui.MWSignatureTool.static.commandName = 'signature';
ve.ui.toolFactory.register( ve.ui.MWSignatureTool );
// Command to insert signature node.
/*ve.ui.commandRegistry.register(
new ve.ui.Command( 'signature', 'content', 'insert', { args: [ [
{ type: 'mwSignature' },
{ type: '/mwSignature' }
] ] } )
);*/
});
//mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Matma_Rex/visualeditor-signature.js&action=raw&ctype=text/javascript');