Thread:Extension talk:WYSIWYG/Buttons to add/edit references Cite error: Invalid ref tag; refs with no name must have content

Varlin has provided this modication: http://wikirouge.net/nowiki/mediawiki/WYSIWYG/ where there is f.ex buttons to create/modify references.

I modified file WYSIWYG\ckeditor\plugins\mediawiki\dialogs\ref.js like this to support reference names:

1. In the beginning in "var loadElements = function" this was added: //Parse also possible name of reference var rname = null; rname = element.getAttribute('name'); if ( rname.length > 0 ) this.setValueOf( 'info','value', rname ); else this.setValueOf( 'info','value', "" );

2. In the "onOk : function" I had to add this code: //CKEditor with FireFox v26.0 removes references from page in case text //of reference is empty (when using reference names) => convert empty value to '_' if (content.length == 0 && value.length > 0) content = '_';

3. In my installation of MW1.22 name attribute of referenced tag is called "name", not "value" (I do not know why) so I had to change also this line in the end of "onOk : function": realElement.setAttribute('name',value); //Was 'value'