Make WordPress Core

Opened 9 years ago

Last modified 6 years ago

#41106 new defect (bug)

wp_editor() doesn't support attributes besides id and class

Reported by: Shelob9 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Editor Version:
Severity: normal Keywords:
Cc: Focuses:

Description

I'm replacing a generic textarea with a WYSIWIG field. My textarea has an aria-describedby attribute, but wp_editor() -- really _WP_Editors::editor() -- can't set any HTML attributes besides ID and class on the WYSIWIG.

Would be better if I could do something like this:

	wp_editor( 'hi-roy', 'Some text', array(
		'attrs' => array(
			'aria-describedby' => 'description'
		)
	));
	echo '<p id="description">Some description</p>';

Change History (2)

This ticket was mentioned in Slack in #core by noisysocks. View the logs.


6 years ago

#2 @noisysocks
6 years ago

  • Component GeneralEditor
Note: See TracTickets for help on using tickets.