From ff6fb06f3801e24651b4d07c6f5dace0ab5065b1 Mon Sep 17 00:00:00 2001 From: adiantek Date: Mon, 12 Nov 2018 06:34:21 +0100 Subject: [PATCH] Update SCEditor.js --- src/lib/SCEditor.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib/SCEditor.js b/src/lib/SCEditor.js index d2b67f312..fb7c0bca4 100644 --- a/src/lib/SCEditor.js +++ b/src/lib/SCEditor.js @@ -2068,6 +2068,21 @@ export default function SCEditor(original, userOptions) { original.value = base.val(); }; + /** + * Replaces any emoticon codes in the passed HTML + * with their emoticon images + * + * @function + * @name replaceEmoticons + * @since XYZ + * @memberOf SCEditor.prototype + */ + base.replaceEmoticons = function (el) { + if (options.emoticonsEnabled) { + emoticons + .replace(el, allEmoticons, options.emoticonsCompat); + } + }; /** * Replaces any emoticon codes in the passed HTML * with their emoticon images