WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#35299 new defect (bug)

HTML code doesn't always show in page editor

Reported by: JustinBBC Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Editor Keywords:
Focuses: Cc:
PR Number:

Description

I have a <style> tag block at the top of a page, but that code does not show in a certain workflow.
1) browse to the dashboard
2) select a page category (Expositions, in my case)
3) select the Edit link for the page that has the <style> tag
--> The Text tab is shown, and all the HTML is shown, no problem
4) select the Visual tab
5) select the Text tab
--> Now the <style> block is missing! Everything below it is shown (a <table> block, in my case).

WordPress 4.4

Justin

Attachments (2)

wp_bugshown.PNG (22.1 KB) - added by JustinBBC 4 years ago.
style tag missing
wp_bugnotshown.PNG (24.8 KB) - added by JustinBBC 4 years ago.
style tag shown

Download all attachments as: .zip

Change History (3)

@JustinBBC
4 years ago

style tag missing

@JustinBBC
4 years ago

style tag shown

#1 @francbarberini
4 years ago

Hi Justin,
I think this is not a Wordpress or Tinymce editor bug.
<style> tag is actually not a valid element for Tinymce.

I found a solution for your problem here: http://wordpress.stackexchange.com/questions/143628/allowing-style-tag-in-tinymce-editor.

I just tested the code in the answer and it seems to work well.

Note: See TracTickets for help on using tickets.