CakePHP with TinyMce Editor: Numbered and Bulleted Lists Not Displayed in view.ctp

I have a TinyMce editor linked to several long text fields in an edit.ctp file. When I create bulleted or numbered lists, they appear correctly in edit.ctp, but in view.ctp they appear without bullets or numbers. These are just piles of left-handed text. All other special formatting (e.g. bold, italics, underline, indentation, etc.) are displayed correctly in view.ctp. Is there something I need to do for a field in my view in order to display markers / numbers?

Examples of problems:

Content in the TinyMCE editor embedded in my edit.ctp:

enter image description here

Same content in my view.ctp

enter image description here

I tried using html_entity_decode to no avail.

+5
source share
2 answers

The problem was related to my cake.generic.css file. There was a wrong style. After correction, bullets and numbered lists appeared correctly.

0
source

Try creating a style from the outside using CSS or jQuery. Because the <ul> and <li> tags must be stored in the database. How:

CSS:

 ul{ list-style-type: circle; } 

JQuery

 $( ul).css( "list-style-type", "circle" ); 
0
source

Source: https://habr.com/ru/post/1266643/


All Articles