How to make different style numbered list and bulleted list in content editable div by jQuery HTML -


I am making a rich text editor without any plugin because I do not customize any plugin with my style

Now I want to add many style bullet lists and numbered lists.

Number of numbers like:

  1) adsdd a) sdsdsds i) dfdfdfddf 2) erererere  

bullet style below I would like to use different symbols when pressing the tab key while also editing the contentable divas. If you press the Tab key in it, it will proceed to the four places.

I have used xcmand for the orderlists and ansialists but this gives me only one style

My jQuery code is:

  function command list 1 () {document.execCommand ('formatblock', false, 'p') var listId = window.getSelection (). FocusNode.parentNode; $ (ListId) .addClass ("oder2"); Warning (ListId); $ (". TextContent") keydown (function (e) {if (i & lt; 6) {if (e.keyCode == 9) {if (i === 0) {var listId1 = window.getSelection () Focus Node.parentNode; $ (listId1) .removeClass ('oder2'); $ (listId1) .addClass ("oder3"); i ++; $ (". Textcontent") keydown (function (e) {if (e. KeyCode == 8) {var nodeNull = listId1.textContent; if (listId1.textContent === '') Warning (noddool); $ (listId1) .removeClass ('oder3');}});} and if (i === 1) {var listId2 = window.getSelection (). Focus Node.parentNode; $ (listId2) .removeClass ("oder3"); $ (listId2) .addClass ("oder4"); i ++;} e. PreventDefault (); e.stopPropagation (); // Description is false;}}}); }  

CSS:

  body {counter reset: section; } .oder2 {Counter reset: sub-section; Padding-left: 3am; } .oder2: First {counter wage increase: section; Content: Counter (section) ")"; } .oder3 {Counter reset: sub-section 1; Padding-left: 6am; }. Eder 3: First {pay-per-increment: sub-section; Content: Counter (Subsection, Lower-alpha) ")"; / * Counter (section) "." Counter ("section"); * /} .oder4 {padding-left: 9am; } .oder4: Earlier {counter wage increase: sub-section 1; Material: Counter (Subsection 1, Lower-Roman) "); / * Counter (section) "." Counter ("section"); * /}  


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -