Opened 8 years ago
Closed 8 years ago
#31890 closed defect (bug) (fixed)
Link to existing content added in Text Editor disappear after switch to Visual editor and back
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Editor | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
Links (to existing content) created in Text Editor are not shown in Text Editor after switch once to Visual Editor and back
To reproduce:
Open Post in Visual Editor.
Switch to Text Editor
Add Link to existing content with the Editor Bar "link" button
Save / Update Post/Page
Switch once to Visual Editor and back to Text Editor
Link is disappeared
Link does not render in front end.
Tested with Theme 2014 / No plugins / Clean new WP Install / New Database
Attachments (3)
Change History (22)
#2
@
8 years ago
hmm
OK; so far I see it works.
(if we add anchor text)
Not sure though if this wasn't different before.
And it would perhaps be good to add a option directly in the window where we set "already existent link" :
"Add Anchor Text"
or even better, include the anchor text automatically?
This workflow as is, will (and currently does), confuse users.
It's not 100% user friendly
My bad I declared it as bug and did not recognize the mistake I did...
#3
follow-ups:
↓ 4
↓ 6
@
8 years ago
- Keywords has-patch needs-testing added
For what I can see, the "Link Text" field is hidden for some reason when the dialog window is trigger from text mode view.
I don't know if there is a special reason for that, anyway the patch removes that line and now the label text field is visible and working.
#4
in reply to:
↑ 3
@
8 years ago
- Component changed from General to Editor
- Milestone changed from Awaiting Review to 4.2
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
8 years ago
#6
in reply to:
↑ 3
@
8 years ago
Replying to Tmeister:
...the "Link Text" field is hidden for some reason when the dialog window is trigger from text mode view.
The reason is that the Text editor is targeted at more advanced users that are able (and willing) to type HTML by hand. There the benefit of using the Link dialog is to quickly find a permalink to an existing post. The linked text can be added/removed/edited easily directly in the textarea.
Suggesting wontfix.
#7
@
8 years ago
- Keywords 2nd-opinion added
Agreed so far.
Just a observation:
- Create link WITHOUT typing the "link text"
- Update
- Switch once Visual/text
- Link disappeared
- Logout/login
- Link is back in text-editor
IF we keep this as is, perhaps there is still something wrong with the logout/login steps mentioned above.
EITHER the link should disappear (also after logout/login)
OR it should always stays visible in the Text Editor
Also "wiling"/"skilled" users could get confused by this "behavior"
#9
@
8 years ago
As I said in the first comment this is not really a bug is more about usability but I'm agree, if this has been the default behavior there is no reason to fix it.
This ticket was mentioned in Slack in #core by sergeybiryukov. View the logs.
8 years ago
#12
follow-up:
↓ 13
@
8 years ago
- Milestone changed from Awaiting Review to 4.2
- Version set to trunk
Replying to azaozz:
The reason is that the Text editor is targeted at more advanced users that are able (and willing) to type HTML by hand. There the benefit of using the Link dialog is to quickly find a permalink to an existing post. The linked text can be added/removed/edited easily directly in the textarea.
Suggesting wontfix.
When I created #28206 it was based on the use case of bbPress where we use the Text editor for topics and replies:
Quoting netweb:
As we start moving the Rosetta (International WordPress.org forums) sites to bbPress 2.x and "down the road" WordPress.org support forums to bbPress 2.x we need the "text editor" to be friendly for all users, not just advanced users who know HTML.
Per a discussion just now in Slack #core with Helen and rather than open another ticket moving into 4.2
I haven't tested the patch here yet but will do so soonishly :)
#13
in reply to:
↑ 12
@
8 years ago
Replying to netweb:
The logic for showing the text field when opened from the Visual editor is: no selection or only text selected. No text field when a linked image is selected.
The patch works partially. To always show the Link text field, it needs to be changed to inputs.wrap.addClass( 'has-text-field' );
, not removed. It currently doesn't load selected text in the Link Text field and cannot "edit" a link, i.e. load both the text and URL when the caret is in a place wrapped in an <a> tag.
In that terms, not sure if this is a desirable change. We can add all these features to match the Visual editor, but not in RC. Also that will be quite different from the rest of the Text editor.
This ticket was mentioned in Slack in #core by drew. View the logs.
8 years ago
#16
@
8 years ago
- Keywords needs-testing removed
I'm 50/50 on whether we should leave this as-is or make the "Link Text" field always visible when using the Text editor. 31890.1.patch makes it always visible.
#17
@
8 years ago
In 31890.2.patch: also load any selected text in the "Link Text" field when opening the modal from the Text editor. Tested in Chrome, Firefox, IE11 and IE8.
#18
@
8 years ago
I think it's better to have the link modal work the same in the text editor - it's already a different experience from other tags, so I don't see that it's a terrible thing. I would say that it would also be better on touch devices, except that with the zooming + keyboard fly-up, text mode is basically unusable on iOS right now. Will test and get 31890.2.patch in.
Not sure that this is a bug.
When you use the Add Link Button (in text mode) and you select an existing content the link in the editor is something like this:
The anchor text is empty and if you do not add an anchor text the link disappears.
I think that we need to add an anchor text field in the dialog window.