[wp-trac] [WordPress Trac] #28305: Visual Editor Anchor Button Behavior
WordPress Trac
noreply at wordpress.org
Mon May 19 15:13:13 UTC 2014
#28305: Visual Editor Anchor Button Behavior
--------------------------+-----------------------------
Reporter: josh401 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 3.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Hello.
The "anchor" button in the TinyMCE editor is acting a bit strange.
From Andrew Ozz's explanation here (http://wordpress.org/support/topic
/anchors-using-button-dont-stay-when-updated?replies=5#post-5594599).
The anchor button is removing any highlighted text just prior to inserting
the anchor.
Here are the steps to replicate:
1. Create some text in visual view; `This is a test link.`
2. Highlight the word `test` and click the anchor button.
3. Add `myTest` as the anchor name.
4. Switch to 'text' view.
You will see the editor has removed the word `test` and replaced it with
`<a id="myTest"></a>`.
The original word `test` (or whatever you highlight just prior to clicking
the anchor button) gets removed completely.
I think we just need to add back in the 'editor selection' when the link
is created; and push it back to the WordPress editor.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28305>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list