Make WordPress Core

Opened 12 years ago

Closed 7 years ago

#31642 closed defect (bug) (worksforme)

Editor Not Formatting List Properly

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

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
11 years ago

  • Component EditorTinyMCE

#2 @azaozz
11 years ago

  • Milestone Awaiting Review
  • Resolutionworksforme
  • Status newclosed

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 on 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 List button, it works properly.

Version 0, edited 11 years ago by azaozz (next)

#3 @semrocc
11 years ago

  • Resolution worksforme
  • Status closedreopened

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
11 years ago

  • Resolutionworksforme
  • Status reopenedclosed

#5 @semrocc
11 years ago

  • Resolution worksforme
  • Status closedreopened

#6 @azaozz
11 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
11 years ago

  • MilestoneAwaiting Review

#8 @azaozz
7 years ago

  • Resolutionworksforme
  • Status reopenedclosed

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.