static/tinymce/plugins/lists/editor_plugin_src.js
function isEndOfListItem() {
				var node = ed.selection.getNode();
				var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
				var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
				return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
			}
function isEndOfListItem() {
				var node = ed.selection.getNode();
				var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
				var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
				return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
			}
/*
If we are at the end of a list item surrounded with an element, pressing enter should create a
new list item instead without splitting the element e.g. don't want to create new P or H1 tag