nozer/quill-delta-to-html

Bullets don't show up

Closed this issue · 1 comments

I am not sure if this is specific to my configuration. But list bullets don't seem to be showing up in the rendered HTML. This is using the demo-browser.html. And in real use cases, the bullet text seems to be missing entirely.

The following is the delta we are looking to render:

{"ops":[{"insert":"Based on the announcement any material that falls under the below needs to be approved by the authorities prior to use:\n"},{"insert":"Brochures, detail aids, drop cards, deave behind materials with medical claims.","attributes":{"list":"bullet"}},{"insert":"\n","attributes":{"list":"bullet","indent":1}},{"insert":"Posters, roll ups, pop ups, congress booth with medical claims.","attributes":{"list":"bullet"}},{"insert":"\n","attributes":{"list":"bullet","indent":1}},{"insert":"Patient educational guide, physician educational guide","attributes":{"list":"bullet"}},{"insert":"\n","attributes":{"list":"bullet","indent":1}},{"insert":"Social Media site: Allowed only for over the counter (OTC) drugs.","attributes":{"list":"bullet"}},{"insert":"\n","attributes":{"list":"bullet","indent":1}}]}

This looks fine in the quill editor, but does not get rendered properly when passed through quill-delta-to-html.

nozer commented

@tzejohn
Your ops format should not have {list: bullet} attribute for ops where insert value is not \n
So, right format would look like this:

var ops = [
   {"insert":"Based on the announcement any material that falls under the below needs to be approved by the authorities prior to use:\n"},
   {"insert":"Brochures, detail aids, drop cards, deave behind materials with medical claims.","attributes":{}},
   {"insert":"\n","attributes":{"list":"bullet","indent":1}},
   {"insert":"Posters, roll ups, pop ups, congress booth with medical claims.","attributes":{}},
   {"insert":"\n","attributes":{"list":"bullet","indent":1}},
   {"insert":"Patient educational guide, physician educational guide","attributes":{}},
   {"insert":"\n","attributes":{"list":"bullet","indent":1}},
   {"insert":"Social Media site: Allowed only for over the counter (OTC) drugs.","attributes":{}},
   {"insert":"\n","attributes":{"list":"bullet","indent":1}}
]