Opened 8 years ago
Closed 8 years ago
#36211 closed enhancement (fixed)
TinyMCE: allow pasting in image captions
Reported by: | azaozz | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Currently when trying to paste in an image caption, the pasted content is moved under the caption. This is to prevent inserting block elements, other images, audio or video in the caption and not "block" the user from being able to paste (as that looks like an editor error).
Better behaviour would be if we allow pasting of text and inline tags in the caption, and move images and media files below.
Attachments (2)
Change History (19)
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
8 years ago
#3
@
8 years ago
- Keywords has-patch needs-testing added
- Type changed from defect (bug) to enhancement
This sounds good! Would need some tests.
#4
@
8 years ago
In 36211.2.patch:
- When pasting in the caption element (
<dd class="wp-caption-dd">
), remove blocks and insert<br>
instead. Also other elements that are going to break the caption. Then let the paste go through. - "Trim" BRs and remove more than one constitutive BRs.
#5
@
8 years ago
Going to commit 36211.2.patch to make it easier for testing. We still may need to tweak it a bit, but seems it behaves properly in most cases.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by jorbin. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by desrosj. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by azaozz. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
#14
@
8 years ago
When pasting paragraphed content, we only introduce a single newline, we might want to do a "reverse wpautop" and get two <br>
's introduced if there's more than one paragraph in the paste, to represent the copied content more clearly.
Pasting in an image URL, are we able to drop the auto-<img>
tag generation? If I paste an image URL in a caption it is with the presumption that I am linking to an original source for the image, and not that I want another image there instead (others mileage may vary, I'm not sure how others would think here, presumptions on peoples workflows are a rocky path to take, but that was my initial impression with that behavior).
In 36211.patch: