Making WordPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#692 closed enhancement (fixed)

The User Contributed Notes comment form should use `wp_editor()` instead of a textarea

Reported by: drewapicture's profile DrewAPicture Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch
Cc:

Description

To aid in formatting the non-code portions of User Contributed Notes in the Code Reference articles, we should leverage a wp_editor() instance with a few formatting buttons instead of a vanilla textarea element.

Patch attached.

Attachments (7)

692.diff (1.9 KB) - added by DrewAPicture 10 years ago.
ucn_before.png (59.3 KB) - added by DrewAPicture 10 years ago.
ucn_after.png (62.1 KB) - added by DrewAPicture 10 years ago.
692.2.diff (3.0 KB) - added by DrewAPicture 10 years ago.
quicktags buttons
692.3.diff (3.1 KB) - added by DrewAPicture 10 years ago.
inline code button
692.4.diff (3.8 KB) - added by DrewAPicture 10 years ago.
Helper text adjustments
692.5.diff (868 bytes) - added by DrewAPicture 10 years ago.
unused code

Download all attachments as: .zip

Change History (17)

@DrewAPicture
10 years ago

#1 @DrewAPicture
10 years ago

Attached before and after screenshots.

#2 follow-up: @samuelsidler
10 years ago

Does the code button output <code> or <pre>? I think we want it to do the former. Related: Is there any way we can turn on the [php] and [html] shortcodes for larger examples? (Or perhaps create buttons for them?)

I know that makes this more complicated. Maybe land as-is and file a follow up to do the above?

@DrewAPicture
10 years ago

quicktags buttons

#3 in reply to: ↑ 2 @DrewAPicture
10 years ago

Replying to samuelsidler:

Does the code button output <code> or <pre>? I think we want it to do the former. Related: Is there any way we can turn on the [php] and [html] shortcodes for larger examples? (Or perhaps create buttons for them?)

I know that makes this more complicated. Maybe land as-is and file a follow up to do the above?

Actually, yes, I was just working on that :-)

692.2.diff incorporates php and js buttons that wrap selected text in [php][/php] and [js][/js] tags. Just try to ignore the whack font-smoothing Firefox is giving off.

http://f.cl.ly/items/0D0T0g3P1s0p0r0R0p29/Screen%20Shot%202014-10-28%20at%209.12.13%20PM.png

@DrewAPicture
10 years ago

inline code button

#4 @DrewAPicture
10 years ago

692.3.diff adds an 'inline code' button which has the exact same behavior of the default code button but re-adding it allows us to control the button label. This would cover the cases of wanting to highlight inline code examples.

@DrewAPicture
10 years ago

Helper text adjustments

This ticket was mentioned in Slack in #meta-devhub by nacin. View the logs.


10 years ago

This ticket was mentioned in Slack in #meta-devhub by coffee2code. View the logs.


10 years ago

#7 @coffee2code
10 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 988:

Use wp_editor() instead of a textarea for user contributed notes comment form.

Includes php, js, inline code QuickTag buttons.

fixes #692.
props DrewAPicture.

@DrewAPicture
10 years ago

unused code

#8 @DrewAPicture
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Looks like some unused code mistakenly snuck in to [988]. The initial approach was to add buttons via mce_buttons|plugins, but eventually we went the quicktags route, so that old code just never got removed. See 692.5.diff.

#9 @coffee2code
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 989:

developer.wordpress.org: remove unused code added in r988

fixes #692.
props DrewAPicture.

This ticket was mentioned in Slack in #meta-devhub by kimparsell. View the logs.


10 years ago

Note: See TracTickets for help on using tickets.