#31571 closed enhancement (fixed)
If you select text, and paste a URL from the clipboard, auto-link the selected text rather than replace it with the URL
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.2 | Priority: | low |
Severity: | minor | Version: | 4.2 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
The summary kind of says it, but I think this is a text editor interaction pattern I'm seeing more and more now that is pretty addictive once you use it, and makes a very common task much faster.
I think this would be a groovy enhancement to our WYSIWYG, but isn't urgent or a blocker for anything.
Attachments (4)
Change History (18)
This ticket was mentioned in Slack in #core-editor by matt. View the logs.
10 years ago
#3
@
10 years ago
- Milestone changed from Awaiting Review to 4.2
31571.patch is looking good. Only thinking we should look at what exactly is selected and check that the selection is not inside a link already.
It is possible to select several paragraphs and turn them into a link, not sure we want that whit this method. Also, we (probably) want to support that when an image is selected, need to exclude placeholder images, etc.
#4
@
10 years ago
Also, we (probably) want to support that when an image is selected, need to exclude placeholder images, etc.
That's right, though we should probably prevent any commands for these, just like wpviews.
#5
@
10 years ago
Only thinking we should look at what exactly is selected and check that the selection is not inside a link already.
So if there's a link already, it should insert, not update? I think updating is fine. :)
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
10 years ago
#8
@
10 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 31691:
#9
@
10 years ago
- Component changed from Editor to TinyMCE
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
We can't ignore all commands. Toggling the toolbar is impossible now if a placeholder is selected. We'll probably need to handle this like the views.
#10
@
10 years ago
- Keywords has-patch added; needs-patch removed
Played a bit with the formatter and data-mce-contenteditable="false"
, but there doesn't seem to be an easy way to ignore certain elements. So better to remove that part. After all placeholders could be linked before using the button.
I like this idea. :)
Works for images too.