#27378 closed defect (bug) (fixed)
<!--more--> displaced in editor when switching from Visual to Text mode
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.9 | Priority: | normal |
| Severity: | normal | Version: | 3.9 |
| Component: | Editor | Keywords: | |
| Focuses: | administration | Cc: |
Description
With the new TinyMCE in 3.9 beta 1, the <!--more--> tag is displaced when I switch from the Visual to Text mode. This only happens for more tags set in posts prior to upgrading to 3.9 beta 1. If I insert a more tag using the current editor, the position is restored.
Reproduction steps:
- Load post with a more tag set in 3.8.1.
- Switch from Visual to Text editor. Notice the more tag is now at the top.
- Switch back to Visual editor. Notice the more tag is now at the top.
Here is an image showing the process:
Here is the post_content entry in the database for this post, which was created normally through the editor in WordPress 3.8.1.
mysql> select post_content from wp_posts where ID=102; +--------------------------------------------------------------------------------------------------------------+ | post_content | +--------------------------------------------------------------------------------------------------------------+ | It was blustery out there today, but we had a great time. Check out the photos!<!--more-->Here is some more. | +--------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
And here is what the database entry looks like when I create a new post in 3.9 Beta 1 (this works fine when switching).
mysql> select post_content from wp_posts where ID=186; +----------------------------------------------------------+ | post_content | +----------------------------------------------------------+ | Here is my awesome text. <!--more--> And some more | +----------------------------------------------------------+ 1 row in set (0.00 sec)
Please let me know if there is anything else I can do to help. But I have never looked at the TinyMCE code so I'm afraid I won't be much help there.
Attachments (1)
Change History (8)
#4
@
11 years ago
@hauvong thanks for the patch but it would append <p> node inside another <p>. Also this needed more changes to get it working right.
Leaving open for now in case other tweaks are needed.
#7
in reply to:
↑ 5
@
11 years ago
- Resolution set to fixed
- Status changed from assigned to closed
Replying to DH-Shredder:
azaozz: Anything left here?
This should be done. No more unexpected behavior reported in the last 10 days. The best position for the <more> and <nextpage> tags is at the end of a paragraph that is a direct child of the body, however the tags are not moved if inserted in the Text editor (so the user can choose another position). Feel free to reopen if this still behaves unexpectedly.
I will like to add that adding a more tag is also adding a new paragraph. Even if you remove the paragraph manually switching back and forth between visual mode and text mode puts the paragraph back and sometimes it ends up putting the more tag at the top of the copy. Added a video describing the issue here: https://www.youtube.com/watch?v=QJIKjOepNwA&feature=youtu.be