diff src/sceditor.js @ 37:0c4e4b5ef40d

remove fragmentToHtml
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 17 Aug 2022 12:00:57 -0600
parents 21090996a131
children 2dfdaaac9482
line wrap: on
line diff
--- a/src/sceditor.js	Tue Aug 16 13:50:36 2022 -0600
+++ b/src/sceditor.js	Wed Aug 17 12:00:57 2022 -0600
@@ -5610,11 +5610,6 @@
 			pluginManager.call('paste', paste);
 			trigger(editorContainer, 'paste', paste);
 
-			if ('fragmentToHtml' in format) {
-				paste.val = format
-					.fragmentToHtml(paste.val, currentNode);
-			}
-
 			pluginManager.call('pasteHtml', paste);
 
 			var parent = rangeHelper.getFirstBlockParent();
@@ -5911,16 +5906,14 @@
 		 * @param {string} start
 		 * @param {string} [end=null]
 		 * @param {boolean} [filter=true]
-		 * @param {boolean} [convertEmoticons=true] If to convert emoticons
 		 * @param {boolean} [allowMixed=false]
-		 * @return {this}
 		 * @since 1.4.3
 		 * @function
 		 * @name insert^2
 		 */
 		// eslint-disable-next-line max-params
 		base.insert = function (
-			start, end, filter, convertEmoticons, allowMixed
+			start, end, filter, allowMixed
 		) {
 			if (base.inSourceMode()) {
 				base.sourceEditorInsertText(start, end);
@@ -5938,10 +5931,6 @@
 
 				start += html + end;
 			}
-			// TODO: This filter should allow empty tags as it's inserting.
-			if (filter !== false && 'fragmentToHtml' in format) {
-				start = format.fragmentToHtml(start, currentNode);
-			}
 
 			// Convert any escaped HTML back into HTML if mixed is allowed
 			if (filter !== false && allowMixed === true) {