From 0833b2855761f6d990de6bf0d883f78b4f25dd30 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Thu, 1 Feb 2018 12:40:49 +0100 Subject: [PATCH] Koenig - Rename server-side cards refs https://github.com/TryGhost/Ghost/issues/9311 - match card names to the new generic Koenig card names introduced in https://github.com/TryGhost/Ghost-Admin/commit/95a068615db20664dab578da2e71499ce8b9c50d --- core/server/lib/mobiledoc/cards/card-markdown.js | 4 ++++ core/server/lib/mobiledoc/cards/hr.js | 2 +- core/server/lib/mobiledoc/cards/html.js | 2 +- core/server/lib/mobiledoc/cards/image.js | 2 +- core/server/lib/mobiledoc/cards/markdown.js | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 core/server/lib/mobiledoc/cards/card-markdown.js diff --git a/core/server/lib/mobiledoc/cards/card-markdown.js b/core/server/lib/mobiledoc/cards/card-markdown.js new file mode 100644 index 0000000000..cd1f94cf3f --- /dev/null +++ b/core/server/lib/mobiledoc/cards/card-markdown.js @@ -0,0 +1,4 @@ +// this card is just an alias of the `markdown` card which is necessary because +// our markdown-only editor was using the `card-markdown` card name +let markdownCard = require('./markdown'); +module.exports = markdownCard; diff --git a/core/server/lib/mobiledoc/cards/hr.js b/core/server/lib/mobiledoc/cards/hr.js index 06022a2a19..3df54808ec 100644 --- a/core/server/lib/mobiledoc/cards/hr.js +++ b/core/server/lib/mobiledoc/cards/hr.js @@ -1,5 +1,5 @@ module.exports = { - name: 'card-hr', + name: 'hr', type: 'dom', render(opts) { return opts.env.dom.createElement('hr'); diff --git a/core/server/lib/mobiledoc/cards/html.js b/core/server/lib/mobiledoc/cards/html.js index 0fff642df6..40d1df9a5f 100644 --- a/core/server/lib/mobiledoc/cards/html.js +++ b/core/server/lib/mobiledoc/cards/html.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - name: 'card-html', + name: 'html', type: 'dom', render(opts) { let html = `
${opts.payload.html}
`; diff --git a/core/server/lib/mobiledoc/cards/image.js b/core/server/lib/mobiledoc/cards/image.js index 554f06d5a9..24d35fc4b1 100644 --- a/core/server/lib/mobiledoc/cards/image.js +++ b/core/server/lib/mobiledoc/cards/image.js @@ -1,5 +1,5 @@ module.exports = { - name: 'card-image', + name: 'image', type: 'dom', render(opts) { var img = opts.env.dom.createElement('img'); diff --git a/core/server/lib/mobiledoc/cards/markdown.js b/core/server/lib/mobiledoc/cards/markdown.js index acf8059d8b..459dc4c92e 100644 --- a/core/server/lib/mobiledoc/cards/markdown.js +++ b/core/server/lib/mobiledoc/cards/markdown.js @@ -1,5 +1,5 @@ module.exports = { - name: 'card-markdown', + name: 'markdown', type: 'dom', render: function (opts) { var converters = require('../converters'),