JCE pro adding space between < & ! while commenting code in <Style> tag in editor

57 Views Asked by At

I just updated the JCE extension to JCE Pro(version - 2.9.10) in Joomla 3.9.27. Now, in the article content in Joomla at the admin panel, I am adding the style tag with the comment like below

<style>
<!--
.wrapper {
 display:block;
 padding: 10px;
}
-->
</style>

Now when I switch the editor to the Code tab then it adds the space between < & ! like below

<style>
< !--
.wrapper {
 display:block;
 padding: 10px;
}
-->
</style>

before updating to the JCE pro it worked fine.

Please check the below image for more details.

Editor tab

In the editor tab

Code tab In the Code Tab

1

There are 1 best solutions below

0
David Taiaroa On

If you want to comment code in CSS, you wrap it inside /* */ marks, eg

<style>
/*
 .wrapper {
    display:block;
    padding: 10px;
  }
*/
</style>

You've unintentionally used the HTML comment marks <!-- -->