Make WordPress Core

Opened 9 years ago

Closed 5 years ago

#31642 closed defect (bug) (worksforme)

Editor Not Formatting List Properly

Reported by: semrocc's profile semrocc Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1.1
Component: TinyMCE Keywords:
Focuses: Cc:

Description

Steps to reproduce:

  1. Create a post with a list in Notepad Text Editor
  1. Copy and paste it into the WP editor
  1. Highlight the list as below:

http://www.networkmedia.ca/web2/images/forum-images/txt-1.jpg

Result after clicking the list button:

http://www.networkmedia.ca/web2/images/forum-images/txt-2.jpg

This bug has been present since WP 4.0

Change History (8)

#1 @iseulde
9 years ago

  • Component changed from Editor to TinyMCE

#2 @azaozz
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

The only way I can reproduce this is when I create the list first, and then paste the text. That way all of the pasted content is in the first list item. This is the same behaviour as other text editors/word processors.

Perhaps this has been fixed in the meantime but if I paste the text first and then select the paragraphs and click the Ordered or Unordered List button, it works properly.

Last edited 8 years ago by azaozz (previous) (diff)

#3 @semrocc
8 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Unfortunately this has not been fixed and is a constant headache. The same scenario happens when highlighting text and selecting blockquote. The editor does not seem to know what to do.

#4 @semrocc
8 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

#5 @semrocc
8 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

#6 @azaozz
8 years ago

In that case I'd suggest opening an issue for TinyMCE: https://github.com/tinymce/tinymce/issues and giving them as much information as you can: browser used, any errors in the console, etc.

Also, when you're pasting plain text (as you're copying from a plain text editor), you should toggle the "Paste as text" button. That would produce better results.

#7 @SergeyBiryukov
8 years ago

  • Milestone set to Awaiting Review

#8 @azaozz
5 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

The "guessing" logic about how to interpret pasted content is in the TinyMCE "paste" plugin, upstream. Ideally the content will be formatted after pasting it, or written directly in the editor. Not sure if we can make this work better in WP, seems it needs fixes/changes upstream. At the same time pasting seems to be working satisfactory, especially when pasting plain text.

Closing as worksforme, feel free to reopen with ideas on how to improve the behaviour, preferably with some (pseudo) code/examples.

Note: See TracTickets for help on using tickets.