fixes: https://github.com/TryGhost/Ghost/issues/12219
- the WYSIWYG editor supports ^2^ for superscript and ~2~ for subscript
- with this change, the same syntax is supported in the markdown card, which was missing
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
no issue
- Added `/explore` route which requires min. Admin and is behind a feature flag
- Fetches Admin API key and ID to create a token and return back to Ghost Explore with the correct query params
- Fullscreen UI
no issue
- switched from needing to extend from `ReactComponent` to using a `{{react-render}}` modifier
- modifiers are modern idiomatic Ember for handing "did-insert" hooks and associated lifecycle
- moved code from `<ReactMobiledocEditor>` into `<KoenigReactEditor>`
- no need for the extra layering of components and need to remember two places to modify when adding passthrough args/props
no issue
- `react-editor` controller has much of the same code as the normal editor controller but not all of the editor-instance methods are supported in the react editor yet
- commented out the remaining `.cleanup()` calls that are intended to remove empty cards because the method does not exist and was throwing errors when leaving the react-editor route
no issue
- use the `didCreateEditor` hook to register the editor instance as we do with our Ember version of Koenig
- allows for initial handling of focus control for moving cursor between title and body inputs
- disabled card cleanup call because the react editor does not yet have cards or the custom `cleanup()` method
no issue
- switched to using the `window.ReactDOM` instance that is created when importing the react/react-dom libraries
- React stores state/component references inside of the ReactDOM instance when rendering so we need to make sure all renders use the same instance otherwise it loses track of which component a hook belongs to
- cleaned up unnecessary vendor shims and `prop-types` import
- `react` and `react-dom` vendor shims are unused when using the globals instead of imports
- `prop-types` import+shim is not required as it's part of the `@tryghost/koenig-react` build unlike the earlier direct import of `react-mobiledoc-editor`
This PR switches the default font for Inter to provide a much more reliable typography across various OS's and for better integration with the Ghost brand.
reqs https://github.com/TryGhost/Ghost/pull/15045
- accesses the Ember registry via the `GhostAdmin` global to grab the editor component url that Admin fetches from the config endpoint
- `ember-auto-import` does not allow dynamic imports unless it can see it's an absolute URL, to work around that we strip the `https://` part of the provided URL and manually include it in the template string so it's detectable as an absolute URL when building
- added redirect to posts screen if no editor url is provided in config
no issue
- dropped the bundled `react-mobiledoc-editor` package
- updated `<ReactMobiledocEditor>` component to pull in editor components dynamically
- added a resource function to dynamically import the external module
- added `Container` and `Editor` components that read from the resource function and wrap components of the same name from the external module
- added `<Suspense>` around the `Container` and `Editor` components so that React will show a loading state whilst the external components are still being fetched
- added `<ErrorHandler>` so we can show an error state if loading fails
no issue
- updated ember-cli-build and eslint config to support jsx
- added `react` and `react-dom` libraries
- included them in the build so the `React` and `ReactDom` globals are available for use by third party components
- added vendor shims so we can do things like `import * from 'react'` where the imports are referenced directly to the already imported modules
- added `<ReactComponent>` component
- designed to be extended from in specific react component classes
- renders a div and calls `renderComponent()` action once inserted - this should be replaced in any extended classes in order to render a react component
- handles react rendering and teardown
- added `<ReactMobiledocEditor>` react component that renders an editor composed of components provided by the `react-mobiledoc-editor` package
- added `<KoenigReactEditor>` ember component that renders `<ReactMobiledocEditor>` and handles pass-through of Ember arguments and handling of actions
- updated `<GhKoenigEditorReact>` to render `<KoenigReactEditor>` in place of `<KoenigEditor>`
no issue
- the component wraps the title and editor canvas components, we only want to replace the canvas component with a react experiment so we need a duplicate for use in the `react-editor` experiment templates
refs https://github.com/TryGhost/Ghost/issues/14101
- `{{action}}` is deprecated and should be replaced with `{{on}}` and `{{fn}}` with direct use of methods
- switched to calling `ui.setMainClass` action directly
no issue
- initial set up ready for testing use of react components (specifically an editor component for this experiment) inside of Admin
- added `react-editor` route
- duplicated all editor screen files and updated route references where necessary