Ticket #5035 (closed Task: wontfix)

Opened 4 years ago

Last modified 4 years ago

openTag method doesn't use the attributes arg

Reported by: alfonsoml Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: SVN (CKEditor) - OLD
Keywords: Discussion Cc:

Description

In both basicWriter and htmlWriter the openTag method doesn't use the attributes parameter:

		openTag : function( tagName, attributes )
		{
			this._.output.push( '<', tagName );
		},

and

		openTag : function( tagName, attributes )
		{
			var rules = this._.rules[ tagName ];

			if ( this._.indent )
				this.indentation();
			// Do not break if indenting.
			else if ( rules && rules.breakBeforeOpen )
			{
				this.lineBreak();
				this.indentation();
			}

			this._.output.push( '<', tagName );
		},

Am I missing something here?

In the calls to the method the attributes are sent, but that could be removed as well as the examples about how to use it.

Change History

comment:1 Changed 4 years ago by fredck

  • Keywords Discussion added
  • Type changed from Bug to Task

If you look at the in-code documentation, you will find the following definition for the attributes parameter:

The attributes defined for this tag. The attributes could be used to inspect the tag.

Probably I just wanted to add this extra feature to the writer. I was just predicting that some custom writers could use the attributes to write things differently. This may be used by a bbcode or wiki-code writer.

We cold remove it until not used by us, but it still looks useful and could be good for others out there, bringing no drawbacks.

Do you see any problem with it?

comment:2 Changed 4 years ago by alfonsoml

  • Status changed from new to closed
  • Resolution set to wontfix

If it has been added for forwards compatibility that's OK, I just wondered why the parameter was there.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy