Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#7655 closed enhancement (wontfix)

Code view should reflect output

Reported by: mrmist Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.6.1
Component: TinyMCE Keywords: needs-patch
Focuses: Cc:


Currently, if I enter the following into the visual editor

Here’s a paragraph.

And another…

(So that there is a blank line between the two) and then switch to "code" view, then all I see is this -

Here’s a paragraph.

And another…

Exactly the same as I just typed into the visual editor. However, that's not the code that gets published when I hit publish. The code that gets published is this -

<p>Here&#8217;s a paragraph.</p>
<p> </p>
<p>And another&#8230;</p>

Should the "code" view not actually show the code that's going to be sent to the browser in the finished article? (I.E. the p tags and the entity codes?)

Change History (7)

#1 @caesarsgrunt
10 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.8 to 2.7

+1, definitely. I find the current behaviour very irritating.

But actually the code that gets published should be

<p>Here&#8217;s a paragraph.</p>
<p>And another&#8230;</p>

(i.e. Without the empty pair of p tags between the two 'real' ps. The blank line is interpreted as the end of one paragraph and the start of the next, whilst a single line break would just insert a br tag.)
I don't know which is currently generated, but that's what it should be.

#2 @Viper007Bond
10 years ago

  • Component changed from General to TinyMCE

#3 @ryan
10 years ago

  • Milestone changed from 2.7 to 2.8

Moving enhancements to 2.8.

#4 @DD32
9 years ago

IMO, Code view shouldnt be showing <p> tags, as thats added on output by wpautop(), Should the code view expand shortcodes? Should it show what the output will be once plugins filter it? etc.

In my mind, The code view is for entering html manually ie. not tinymce, its not designed to reflect the output of the blog post, rather, its the input of the blogpost.

Also, this isnt really TinyMCE.. The code view is not tinyMCE.. soo..

9 years ago

  • Milestone changed from 2.8 to Future Release

#6 @Denis-de-Bernardy
9 years ago

suggesting wontfix on this one

#7 @Denis-de-Bernardy
9 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

no apparent interest

Note: See TracTickets for help on using tickets.