Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Switched to explicit mobiledoc version for new posts
Browse files Browse the repository at this point in the history
no issue

- when the mobiledoc spec changes due to a mobiledoc-kit version bump, any posts created with that version will fail to load in the editor if a rollback to an earlier Ghost version occurs
- use an explicit version to avoid the problem - we should only be bumping the mobiledoc spec version if we start using features from that version and mark it as a breaking change
  • Loading branch information
kevinansfield committed Mar 26, 2020
1 parent 7292048 commit 50eaa88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import parserPlugins from '../options/basic-html-parser-plugins';
import registerKeyCommands, {BASIC_KEY_COMMANDS} from '../options/key-commands';
import validator from 'validator';
import {DRAG_DISABLED_DATA_ATTR} from '../lib/dnd/constants';
import {MOBILEDOC_VERSION} from 'mobiledoc-kit/renderers/mobiledoc';
import {arrayToMap, toggleSpecialFormatEditState} from './koenig-editor';
import {assign} from '@ember/polyfills';
import {computed} from '@ember/object';
Expand All @@ -20,7 +19,7 @@ const UNDO_DEPTH = 50;
// blank doc contains a single empty paragraph so that there's some content for
// the cursor to start in
const BLANK_DOC = {
version: MOBILEDOC_VERSION,
version: '0.3.1',
markups: [],
atoms: [],
cards: [],
Expand Down
3 changes: 1 addition & 2 deletions lib/koenig-editor/addon/components/koenig-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import registerKeyCommands from '../options/key-commands';
import registerTextExpansions from '../options/text-expansions';
import validator from 'validator';
import {A} from '@ember/array';
import {MOBILEDOC_VERSION} from 'mobiledoc-kit/renderers/mobiledoc';
import {assign} from '@ember/polyfills';
import {camelize, capitalize} from '@ember/string';
import {createParserPlugins} from '@tryghost/kg-parser-plugins';
Expand All @@ -45,7 +44,7 @@ export const TESTING_EXPANDO_PROPERTY = '__mobiledoc_kit_editor';
// blank doc contains a single empty paragraph so that there's some content for
// the cursor to start in
export const BLANK_DOC = {
version: MOBILEDOC_VERSION,
version: '0.3.1',
markups: [],
atoms: [],
cards: [],
Expand Down

0 comments on commit 50eaa88

Please sign in to comment.