#692 closed enhancement (fixed)
The User Contributed Notes comment form should use `wp_editor()` instead of a textarea
Reported by: | DrewAPicture | Owned by: | 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)
Change History (17)
#2
follow-up:
↓ 3
@
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?
#3
in reply to:
↑ 2
@
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.
#4
@
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.
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
@
10 years ago
- Owner set to coffee2code
- Resolution set to fixed
- Status changed from new to closed
In 988:
#8
@
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.
Attached before and after screenshots.