From 5936a06ad18e31862af6991845233b557f11b5ae Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Sun, 23 Feb 2020 23:23:18 -0500 Subject: [PATCH 1/3] Added editorutils file with a utility function to convert mimetype to editor modes --- functions/editorutils.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 functions/editorutils.js diff --git a/functions/editorutils.js b/functions/editorutils.js new file mode 100644 index 00000000000..c8e14a5f99f --- /dev/null +++ b/functions/editorutils.js @@ -0,0 +1,11 @@ +const mimeToMode = { + "text/plain": "plain_text", + "text/html": "html", + "application/xml": "xml", + "application/hal+json": "json", + "application/json": "json" +} + +export function getEditorLangForMimeType(mimeType) { + return mimeToMode[mimeType] || "plain_text"; +} From fa339a51837211d4d98a7e4875682db0071d4882 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Sun, 23 Feb 2020 23:24:23 -0500 Subject: [PATCH 2/3] Updated POST request body to react to the Content Type --- pages/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 4b53a3057d9..5a199673468 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -375,7 +375,7 @@ Date: Mon, 24 Feb 2020 12:21:00 +0530 Subject: [PATCH 3/3] Updated contributors list --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa60e90b528..111eff34225 100644 --- a/README.md +++ b/README.md @@ -315,7 +315,10 @@ See the [CHANGELOG](CHANGELOG.md) file for details. ### Lead Developers * **[Liyas Thomas](https://github.com/liyasthomas)** - *Author* -* **[Caneco](https://twitter.com/caneco)** - *Designer* +* **[John Harker](https://github.com/NBTX)** - *Lead developer* +* **[Andrew Bastin](https://github.com/andrewbastin)** - *Lead developer* +* **[James George](https://github.com/jamesgeorge007)** - *Lead maintainer* +* **[Caneco](https://twitter.com/caneco)** - *Logo and banner designer* ### Testing and Debugging