static/tinymce/plugins/paste/editor_plugin_src.js
function(pl, o) {
			var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;

			// Convert middot lists into real semantic lists
			each(dom.select('p', o.node), function(p) {
				var sib, val = '', type, html, idx, parents;

				// Get text node value at beginning of paragraph
				for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
					val += sib.nodeValue;

				val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');

				// Detect unordered lists look for bullets
				if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
					type = 'ul';

				// Detect ordered lists 1., a. or ixv.
				if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
					type = 'ol';

				// Check if node value matches the list pattern: o&nbsp;&nbsp;
				if (type) {
					margin = parseFloat(p.style.marginLeft || 0);

					if (margin > lastMargin)
						levels.push(margin);

					if (!listElm || type != lastType) {
						listElm = dom.create(type);
						dom.insertAfter(listElm, p);
					} else {
						// Nested list element
						if (margin > lastMargin) {
							listElm = li.appendChild(dom.create(type));
						} else if (margin < lastMargin) {
							// Find parent level based on margin value
							idx = tinymce.inArray(levels, margin);
							parents = dom.getParents(listElm.parentNode, type);
							listElm = parents[parents.length - 1 - idx] || listElm;
						}
					}

					// Remove middot or number spans if they exists
					each(dom.select('span', p), function(span) {
						var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');

						// Remove span with the middot or the number
						if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
							dom.remove(span);
						else if (/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
							dom.remove(span);
					});

					html = p.innerHTML;

					// Remove middot/list items
					if (type == 'ul')
						html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/, '');
					else
						html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');

					// Create li and add paragraph data into the new li
					li = listElm.appendChild(dom.create('li', 0, html));
					dom.remove(p);

					lastMargin = margin;
					lastType = type;
				} else
					listElm = lastMargin = 0; // End list element
			});

			// Remove any left over makers
			html = o.node.innerHTML;
			if (html.indexOf('__MCE_ITEM__') != -1)
				o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
		}
function(pl, o) {
			var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;

			// Convert middot lists into real semantic lists
			each(dom.select('p', o.node), function(p) {
				var sib, val = '', type, html, idx, parents;

				// Get text node value at beginning of paragraph
				for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
					val += sib.nodeValue;

				val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');

				// Detect unordered lists look for bullets
				if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
					type = 'ul';

				// Detect ordered lists 1., a. or ixv.
				if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
					type = 'ol';

				// Check if node value matches the list pattern: o&nbsp;&nbsp;
				if (type) {
					margin = parseFloat(p.style.marginLeft || 0);

					if (margin > lastMargin)
						levels.push(margin);

					if (!listElm || type != lastType) {
						listElm = dom.create(type);
						dom.insertAfter(listElm, p);
					} else {
						// Nested list element
						if (margin > lastMargin) {
							listElm = li.appendChild(dom.create(type));
						} else if (margin < lastMargin) {
							// Find parent level based on margin value
							idx = tinymce.inArray(levels, margin);
							parents = dom.getParents(listElm.parentNode, type);
							listElm = parents[parents.length - 1 - idx] || listElm;
						}
					}

					// Remove middot or number spans if they exists
					each(dom.select('span', p), function(span) {
						var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');

						// Remove span with the middot or the number
						if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
							dom.remove(span);
						else if (/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
							dom.remove(span);
					});

					html = p.innerHTML;

					// Remove middot/list items
					if (type == 'ul')
						html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/, '');
					else
						html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');

					// Create li and add paragraph data into the new li
					li = listElm.appendChild(dom.create('li', 0, html));
					dom.remove(p);

					lastMargin = margin;
					lastType = type;
				} else
					listElm = lastMargin = 0; // End list element
			});

			// Remove any left over makers
			html = o.node.innerHTML;
			if (html.indexOf('__MCE_ITEM__') != -1)
				o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
		}
function ( pl , o ) { var dom = pl . editor . dom , listElm , li , lastMargin = - 1 , margin , levels = [ ] , lastType , html ; // Convert middot lists into real semantic lists
 each ( dom . select ( 'p' , o . node ) , function ( p ) { var sib , val = '' , type , html , idx , parents ; // Get text node value at beginning of paragraph
 for ( sib = p . firstChild ; sib && sib . nodeType == 3 ; sib = sib . nextSibling ) val += sib . nodeValue ; val = p . innerHTML . replace ( / <\/?\w+[^>]*> / gi , '' ) . replace ( / &nbsp; / g , '\u00a0' ) ; // Detect unordered lists look for bullets
 if ( / ^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0* / . test ( val ) ) type = 'ul' ; // Detect ordered lists 1., a. or ixv.
 if ( / ^__MCE_ITEM__\s*\w+\.\s*\u00a0+ / . test ( val ) ) type = 'ol' ; // Check if node value matches the list pattern: o&nbsp;&nbsp;
 if ( type ) { margin = parseFloat ( p . style . marginLeft || 0 ) ; if ( margin > lastMargin ) levels . push ( margin ) ; if ( ! listElm || type != lastType ) { listElm = dom . create ( type ) ; dom . insertAfter ( listElm , p ) ; } else { // Nested list element
 if ( margin > lastMargin ) { listElm = li . appendChild ( dom . create ( type ) ) ; } else if ( margin < lastMargin ) { // Find parent level based on margin value
 idx = tinymce . inArray ( levels , margin ) ; parents = dom . getParents ( listElm . parentNode , type ) ; listElm = parents [ parents . length - 1 - idx ] || listElm ; } } // Remove middot or number spans if they exists
 each ( dom . select ( 'span' , p ) , function ( span ) { var html = span . innerHTML . replace ( / <\/?\w+[^>]*> / gi , '' ) ; // Remove span with the middot or the number
 if ( type == 'ul' && / ^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF] / . test ( html ) ) dom . remove ( span ) ; else if ( / ^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s* / . test ( html ) ) dom . remove ( span ) ; } ) ; html = p . innerHTML ; // Remove middot/list items
 if ( type == 'ul' ) html = p . innerHTML . replace ( / __MCE_ITEM__ / g , '' ) . replace ( / ^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s* / , '' ) ; else html = p . innerHTML . replace ( / __MCE_ITEM__ / g , '' ) . replace ( / ^\s*\w+\.(&nbsp;|\u00a0)+\s* / , '' ) ; // Create li and add paragraph data into the new li
 li = listElm . appendChild ( dom . create ( 'li' , 0 , html ) ) ; dom . remove ( p ) ; lastMargin = margin ; lastType = type ; } else listElm = lastMargin = 0 ; // End list element
 } ) ; // Remove any left over makers
 html = o . node . innerHTML ; if ( html . indexOf ( '__MCE_ITEM__' ) != - 1 ) o . node . innerHTML = html . replace ( / __MCE_ITEM__ / g , '' ) ; }
Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
Converts the most common bullet and number formats in Office into a real semantic UL / LI list .