Topic on Talk:VisualEditor/Gadgets/Add a tool

How to add class to element?

2
Dimka665 (talkcontribs)

I added own tool with some code like. How can I add custom class to added table? To any element?

 	ve.ui.commandRegistry.register(
 		new ve.ui.Command(
 				'insertTable4',
 				'content',
 				'insert',
 				{
 					args: [[
                         { type: 'table' },  // How can I add custom class here?
                         { type: '/table' },
<‎/pre>
Dimka665 (talkcontribs)

How to generate table with custom class {| class="custom" ... |} by Custom VE Command?

Reply to "How to add class to element?"