From b4157e3e8f85141fffe959685ed4866c0a48b93d Mon Sep 17 00:00:00 2001 From: Vivek_Neel Date: Mon, 4 Oct 2021 14:17:50 +0545 Subject: [PATCH] Add support for superscript and subscript --- src/draft-to-markdown.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/draft-to-markdown.js b/src/draft-to-markdown.js index 5c6c171..ee2c27d 100644 --- a/src/draft-to-markdown.js +++ b/src/draft-to-markdown.js @@ -166,6 +166,24 @@ const StyleItems = { close: function () { return '`'; } + }, + 'SUPERSCRIPT': { + open: function () { + return '`^'; + }, + + close: function () { + return '^'; + } + }, + 'SUBSCRIPT': { + open: function () { + return '~'; + }, + + close: function () { + return '~'; + } } };