List-style-position conflicts with rule of mixed inline and block

hello, i need a alignPlugin to make each NodeType can place in the middle of the Editor, as BulletList.

the content of BulletList is

content: "(paragraph | order_list | bullet_list)+",

for the ability of nested inner list, order_list and bullet_list block style NodeType should be list here, so paragraph should be include as well instead of inline*

however, the make the alignPlugin’ text-align:center behaviour unexpectedlly:

that is due to the css attrubte: list-style-position: outside by defualt.
so i change the list-style-position: inside to try to make it work, here comes the problem, the paragraph is a block type,which will lead to a new beak line :slight_smile: the dom structure is something as:

        <p> xxx

the paragraph here lead to this css problem.

is there any way to workaround ? i cannot defined inline and block in schema’s content at the same time, but paragraph in list-item lead to list-style-positon: inside work strangly when try align list center

in fact, if content is inline* only, it works quite well

e… sorry, i just realized that if i add list-style-position:inside and text-align:center on list_item , and add display:inline-flex on paragraph in that list_item. i can achieve what i want…

if anyone come to the problem, maybe worth a shot.

1 Like