Skip to content

Latest commit

 

History

History
808 lines (520 loc) · 35.8 KB

CHANGELOG.md

File metadata and controls

808 lines (520 loc) · 35.8 KB

Changelog

All notable changes to this project will be documented in this file.

0.51.1 - February 9, 2020

Fixed

  • default-document-editor. Create BorderlessOverlayButton statically

0.51.0 - February 5, 2020

Breaking Changes

  • renderer. The renderer doesn't accept a store enhancer anymore

Fixed

  • plugin-sc-mc-exercise. Resolve focus issues
  • plugin-text. Resolve focus issues
  • plugin-text. Provide our own types for slate, slate-html-serializer and slate-react
  • renderer. Provide specialized store for the renderer

0.50.0 - January 27, 2020

This release cleans up the plugin states for the soon-ish 1.0.0 release. Note that this contains breaking changes in the serialized states so you'll need to migrate any persisted Edtr.io states. As far as we know, this concerns only Serlo so far. Please get in touch if this affects you, too, and we gladly help with migrating.

Breaking Changes

  • plugin-equations. Remove @edtr-io/plugin-equations. We'll experiment with that plugin at Serlo and might publish it as an Edtr.io plugin in the future again.

  • plugin-files. Breaking change in serialized state:

    • Rename location to src
  • plugin-highlight. Breaking changes in serialized state:

    • Rename text to code
    • Rename lineNumbers to showLineNumbers
  • plugin-hint. Remove @edtr-io/plugin-hint. Please build your own domain-specific plugins using ExpandableBox in @edtr-io/renderer-ui.

  • plugin-image. Breaking changes in serialized state:

    • Combine href, target and rel into the new optional object link with properties href and openInNewTab
    • Rename description to alt and made it optional
    • Make maxWidth optional
  • plugin-important-statement. Remove @edtr-io/plugin-important-statement

  • plugin-input-exercise. Breaking change in serialized state:'

    • Remove migratable, i.e. accept only the latest state
  • plugin-sc-mc-exercise. Breaking change in serialized state:

    • Rename id to content
    • Remove hasFeedback
  • plugin-solution. Remove @edtr-io/plugin-solution. Please build your own domain-specific plugins using ExpandableBox in @edtr-io/renderer-ui.

  • plugin-text. Breaking change in serialized state:

    • Use slate 0.50+ state for serialization so that we can upgrade to slate 0.50+ after releasing 1.0.0 in a non-breaking way. You can use the newly exported serializer.serialize to migrate old slate states.
  • plugin-video. Breaking changes in serialized state:

    • Remove migratable, i.e. accept only the latest state

Added

  • plugin. Add new state type optional to work with optional values.

0.14.0 - January 23, 2020

Breaking Changes

  • Plugins no longer receive insert, remove, replace, mergeWithPrevious, mergeWithNext via plugin props. Please use the new actions and selectors instead. If you wrote a plugin that provided those, implement the new insertChild and removeChild.
  • Plugins no longer receive their parents' plugin props. Please use the store instead if you need to access your parents somehow.
  • Plugins no longer receive their name. Please get your document from the store if you really need that
  • For consistency, plugins receive the StateTypeReturnType in the optional isEmpty instead of their StateTypeValueType
  • plugin. State types no longer receive the plugin props. This was only used by child anyways to handle the parents' plugin props.
  • plugin-text. The blockquote controls will only be shown if the type of the blockquote plugin is provided via plugin config.

Added

  • store. Add wrap and unwrap actions
  • store. Add replace action
  • store. Add insertChildAfter, insertChildBefore and removeChild actions
  • store. Add getParent selector
  • store. Add mayInsertChild and mayRemoveChild selector

Fixed

  • store. When undoing resp. redoing, replace the state only once

0.13.7 - January 20, 2020

Fixed

  • plugin-rows. Fix drag and drop in Chrome

0.13.6 - January 15, 2020

Fixed

  • plugin-rows. Improve drag and drop, handle drag and drop between multiple documents correctly

0.13.5 - January 14, 2020

Fixed

  • Various improvements & fixes in the TypeScript declaration files

0.13.4 - January 14, 2020

Added

  • Accept the newly released styled-components v5 additionally to v4 as peer dependency

0.13.3 - January 13, 2020

Fixed

  • plugin-highlight. Fix server-side rendering

0.13.2 - January 7, 2020

Fixed

  • core. Show toolbar if renderIntoToolbar was called

0.13.1 - January 4, 2020

Added

  • Plugins receive new prop renderIntoToolbar to render toolbar buttons

Fixed

  • store. serializeDocument no longer returns a new object in every call

0.13.0 - December 20, 2019

Breaking Changes

  • All core plugins now consistently export createFooPlugin(), FooState and FooProps. The factory createFooPlugin() accepts a (sometimes optional) config depending on the plugin.

  • Plugins now receive their config via a new prop config. Furthermore, they need to specify their config in their definition.

  • Packages that are only intended for internal use are now consistently named @edtr-io/internal__${name}. We don't consider these packages as part of the public API and therefore won't note their potential breaking changes in the future. More specifically, this means that the following packages have been removed:

    • @edtr-io/abstract-plugin,
    • @edtr-io/abstract-plugin-state
    • @edtr-io/bundle-size,
    • @edtr-io/demo,
    • @edtr-io/fixtures
  • Plugins no longer receive the prop renderIntoExtendedSettings (that was only passed down to direct children of the rows plugin). Instead, please use the new prop renderIntoSettings that now all documents receive.

  • core, plugin-rows. We now have a peer dependency on react-dnd@^10.0.0 and react-dnd-html5-backend@^10.0.0 (both ^7.0.0 previously)

  • core. Removed OverlayContext and OverlayContextValue.

  • editor-ui. Moved OverlayButton, OverlayCheckbox, OverlayInput, OverlaySelect, OverlayTextarea into @edtr-io/core

  • editor-ui. Moved icons into @edtr-io/ui

  • editor-ui. Removed SettingsOverlay

  • plugin Removed StatelessPlugin, StatefulPlugin, StatelessPluginProps, StatefulPluginProps. Use EditorPlugin and EditorPluginProps instead

  • ui. Removed OverlayTheme

  • ui. Removed plugins from CustomTheme. Instead, all core plugins that allowed to customize their theme now accept the theme via their config.

Added

  • There are now more parts of the editor's UI configurable. More specifically, we moved the following components in the core:

    • Plugin Toolbar. The plugin toolbar is responsible for rendering the buttons that are shown on the left of focused documents by default. Furthermore, it is responsible for rendering any overlays that the toolbar buttons might open (e.g. the plugin settings). Plugins may override the toolbars of their children (e.g. the rows plugin adds a drag handler) and their settings (e.g. the rows plugin adds a delete and copy button to the settings of its children).

      You may override the looks of the plugin toolbar completely by passing your own implementation as the new optional prop PluginToolbar to Editor. By default we use @edtr-io/default-plugin-toolbar.

    • Document Editor. The document editor is responsible for rendering the plugin toolbar and possible additional editor UI elements that are application-specific.

      You may override the default behavior completely by passing your own DocumentEditor to Editor. By default, we use @edtr-io/default-document-editor

  • core. Added PluginToolbarButton,PluginToolbarOverlayButtonthat are intended to be passed by plugins intorenderToolbar`

  • core. Added selectors getFocused, isFocused

  • plugin. The change handler of state types allows to pass an optional second argument that allows state types to handle asynchronous state updates that should be committed only once

  • ui. Added BottomToolbarTheme to EditorUiTheme

  • plugin-multimedia-explanation. New plugin that allows to position multimedia content (e.g. images, video) beside the content

  • plugin-text. Deserialize pasted HTML into corresponding text state if possible

  • plugin-text. Automatically transform urls into links

  • plugin-text. Add protocol https to urls without protocol

Fixed

  • editor-ui. Position PreviewOverlay over content
  • plugin-text. Correctly render colored text on server
  • core. Improved undo/redo behavior for asynchronous changes (e.g. file uploads)

0.12.0 - October 14, 2019

Breaking Changes

  • renderer-ui. Removed title prop in ExpandableBox. Use the new renderTitle prop instead.

Added

  • editor-ui. Add new component OverlaySelect
  • plugin. Add prop defaultFocusRef for plugins that should be passed as ref to the input element that should be focused initially when the plugin gets focused
  • plugin-video. Add alt text

Changed

  • plugin-input-exercise. Add units to input exercises
  • plugin-text. Heading button opens sub menu even when the block is already a heading
  • plugin-text. Focus empty LaTeX textarea on mount initially
  • renderer-ui. Open ExpandableBox initially

Removed

  • plugin-hint. Remove title
  • plugin-solution. Remove title

Fixed

  • core. Hot keys handler considers the correct state for deleting empty plugins
  • core. Fix focus movement with arrow keys
  • plugin-rows. Make extended settings scrollable
  • plugin-serlo-injection. Automatically resize iframe when content or window height changes
  • plugin-serlo-injection. Reduce content jumps by lazily loading iframes

0.11.3 - September 27, 2019

Fixed

  • plugin-input-exercise. Use migratable in state for backwards compatibility with pre v0.11.2 state
  • plugin-sc-mc-exercise. Fixed server side rendering
  • plugin-text. Fixed server side rendering
  • renderer-ssr. Tests now test for correct results additionally to working server side rendering.

0.11.2 - September 26, 2019

Changed

  • plugin-input-exercise. Changed state and ui to be more consistent with plugin-sc-mc-exercise

Fixed

  • core. onChange callback prop of Editor is now working again
  • plugin-text. Updated slate types to newest version 0.47.1.
  • plugin-text. Fix suggestions for inserting plugins after typing /.

0.11.1 - September 18, 2019

Fixed

  • core. Documents no longer lose focus during editing

0.11.0 - September 16, 2019

Breaking Changes

  • plugin. Refactored StateType API. This should only affect you if you defined custom state types.
  • plugin. Consistently renamed StateDescriptor* types to StateType*
  • plugin. StatelessPluginEditorProps and PluginEditorProps no longer accept the type param Props. Replace StatelessPluginEditorProps<Props> with StatelessPluginEditorProps & Props.
  • plugin. StatelessPlugin may no longer define getFocusableChildren. This is handled by state types instead.
  • plugin. The return type of the built-in child state type is no longer callable. Replace state() with state.get() or state.id to retrieve the id.
  • plugin. The return type of the built-in list state type is no longer callable and doesn't expose items anymore. Instead, the return types behaves like an array itself. Replace state() resp. state.items with state.
  • plugin. The return type of the built-in object state type is no longer callable. Replace state() with state.
  • plugin. The return type of the built-in scalar state types (i.e. boolean, number, string, scalar, serializedScalar) is no longer callable. Replace state() with state.get() or state.value.
  • plugin. The return type of the built-in upload state type is no longer callable. Replace state() with state.get() or state.value.

Added

  • plugin. The return type of the built-in scalar state types (i.e. boolean, number, string, scalar, serializedScalar) now allows to set the value. Instead of state.set("foo"), you may now also use state.value = "foo".
  • store. Add new selector hasFocusedChild that checks whether the given document has any (direct) child that is focused
  • store. Add new selector hasFocusedDescendant that checks whether the given document has any descendant that is focused (i.e. also recursively checks children of children)

0.10.3 - September 13, 2019

Fixed

  • plugin-text. Various fixes (updated Slate)

0.10.2 - September 11, 2019

Fixed

  • store. Specify return type of serializeRootDocument

0.10.1 - September 11, 2019

Added

  • plugin-image. Show upload status of images

Changed

  • plugin-image. Better error messages
  • plugin-rows. Improved performance
  • plugin-text. Improved performance
  • plugin-text. Improved math formulas (e.g. better error messages, responsive block formulas)

Fixed

  • editor-ui. Fix background color in default editor theme
  • plugin-text. Split on enter now works also when there is a list in the same block.

0.10.0 - September 7, 2019

Breaking Changes

  • core Moved actions and selectors to the new package@edtr-io/store:

    // before
    import { actions, selectors } from '@edtr-io/core'
    console.log(actions.undo, selectors.getDocument)
    // now
    import { undo, getDocument } from '@edtr-io/store'
    console.log(undo, getDocument)
  • core. Moved Plugin, StatefulPluginEditorProps, StatelessPluginEditorProps, StatefulPlugin, StatelessPlugin and StateType to the new package @edtr-io/plugin:

    // before
    import { StateType, StatefulPluginEditorProps } from '@edtr-io/core'
    const state = StateType.string()
    // now
    import { string, StatefulPluginEditorProps } from '@edtr-io/plugin'
    const state = string()
  • core. Removed connect, connectDispatchOnly and connectStateOnly. Instead, we now export hooks useDispatch, useSelector and useStore (with scoped counterparts useScopedDispatch, useScopedSelector and useScopedStore)

  • core. Removed useEditorFocus and useEditorHistory since they can easily be replicated with the new useScopedDispatch and useScopedSelector hooks

  • core. Moved all store exports (e.g. createStore) to the new package @edtr-io/store

Added

  • plugin. Published new package @edtr-io/plugin intended to be used by plugin authors. It exposes Plugin, PluginEditorProps, StatelessPluginEditorProps, StatefulPlugin, StatelessPlugin and (flatly) everything that was previously exported as StateType.
  • store. Published new package @edtr-io/store. It (flatly) exposes actions and selectors, and all previous store exports that are mostly for special use cases.

Changed

  • store. The signatures of selectors have been unified. Every selector is now a function (with any number of parameters) and returns a function that accepts the scoped state (and returns any type of return value):

    import { getDocument, getPlugin, getRoot } from '@edtr-io/store'
    useScopedSelector(getRoot())
    useScopedSelector(getDocument('some-id'))
    useScopedSelector(state => {
      const document = /* do something */ null
      return document && getPlugin(document.plugin)(state)
    })```
  • editor-ui. Doesn't have to be a peerDependency anymore

  • renderer-ui. Doesn't have to be a peerDependency anymore

  • ui. Doesn't have to be a peerDependency anymore

0.9.7 - September 6, 2019

Redeployment of previous release since some types weren't published correctly.

0.9.6 - September 6, 2019

Added

  • plugin-text. Remember math mode preference (visual vs. LaTeX)

Changed

  • core. Improve performance

0.9.5 - September 4, 2019

Added

  • plugin-sc-mc-exercise. Make preview overlay not editable
  • plugin-table. Allow overriding of markdown renderer via newly exported createTablePlugin

0.9.4 - August 30, 2019

Added

  • core. Editor is now able to recover from errors. If any error is thrown in the subtree, the respective <Document /> offers users to undo their last change. Furthermore, <Editor /> now accepts an optional onError prop that gets called with the thrown error.
  • plugin-rows. Open plugin menu only when the respective button got clicked (instead of making the whole row clickable)
  • plugin-sc-mc-exercise. Display a preview in edit mode and simplify focusing of exercises.

0.9.3 - August 29, 2019

Added

  • plugin-table. Add placeholder for empty tables
  • plugin-text. Fixed persisting of math formulas

0.9.2 - August 25, 2019

Added

  • plugin-text. Make available plugins customizable via new export createTextPlugin
  • plugin-rows. Make available plugins customizable via new export createRowsPlugin

0.9.1 - August 24, 2019

Redeployment of previous release since some types weren't published correctly.

0.9.0 - August 24, 2019

Breaking Changes

  • core. createStore has a new required option createStoreEnhancer. Our high-level API (e.g. <Editor />, <EditorProvider /> and <Renderer />) handle that change in a non-breaking way, though.

Added

  • core. Expose getUndoStack and getRedoStack selectors

Changed

  • core. Store no longer applies enhancers used for testing or development purposes. Instead, <Editor />, <EditorProvider /> and <Renderer /> provide a new optional prop createStoreEnhancer that allows to extend the store enhancer used. Our previous enhancer for development is published as a new package @edtr-io/store-devtools (e.g. used in our demo).

0.8.3 - August 22, 2019

Changed

  • plugin-equations. Heavily simplified for first release
  • plugin-sc-mc-exercise. Complete redesign

Fixed

  • plugin-highlight. Handle arrow keys and enter within textarea
  • plugin-rows. Show add button when no children exist
  • plugin-table. Handle arrow keys and enter within textarea

0.8.2 - August 14, 2019

Changed

  • Various naming improvements
  • Various small UX improvements

Fixed

  • Add missing dependencies in various packages
  • core. Review public API. For example, useScopedStore is now correctly part of the public API.

Internal

  • Enable eslint rules to enforce consistency in our import statements (automatically fixable with yarn format)
  • Enable eslint rules that warn for common errors in imports (e.g. missing dependencies, ...)

0.8.1 - August 9, 2019

Fixed

  • core. Fix StateType.upload
  • core. Export MigratableStateDescriptor
  • plugin-rows. Add menu doesn't jump to the top of the root document anymore

0.8.0 - August 1, 2019

Breaking Changes

  • When using the newly exposed <Renderer />, defaultPlugin is no longer set to an actual plugin. So you should only rely on defaultPlugin in an editable environment (e.g. to decide which plugin to insert by default) and only pass complete serialized Edtr.io documents to <Renderer />.
  • plugin-text. We no longer import KaTeX's stylesheet to not depend on a CSS-capable bundler. Please include the stylesheet yourself.

Added

  • renderer. Expose <Renderer /> that renders a Edtr.io document with the given plugins with React. We plan to optimize its bundle size to minimize loading times for use cases where no editor is needed. Also, we plan to provide smaller renderer bundles for some of our plugins (e.g. text plugin)
  • renderer-ssr. Expose render that server-side renders a Edtr.io document with the given plugins and returns { styles, html }.
  • plugin-text. Add possibility to write inline-code via CTRL+Q

Changed

  • plugin-text. Make plugin capable to be rendered server-side

Fixed

  • plugin-important-statement. Actually build the plugin before publishing

Internal

  • Tests in __tests-ssr__ folders are executed node environment to test SSR (in contrast to tests in __tests__ folders that are executed in a browser-like environment)

0.7.1 - July 21, 2019

Added

  • core. Add StateType.migratable that allows to update plugin state structure without breaking changes
  • plugin-important-statement. Plugin that highlights important statements.
  • plugin-serlo-injection. Add plugin for injecting serlo.org content
  • plugin-table. Add plugin for markdown tables

Changed

  • Optimize bundle size
  • plugin-rows. add-button is now always visible under the focused document

Fixed

  • plugin-text. Split plugin when pasting multiple blocks

0.7.0 - July 6, 2019

Breaking Changes

  • core. The state exposed in EditorContext introduces an additional layer to support multiple editor instances. Use the useStore helper instead to get the { store: { getState() }, dispatch } of the scoped document.
  • core. EditorContext now exposes { store: { getState() }, dispatch } instead of { state, dispatch }. Therefore, we also removed the EditorContextValue type export
  • core. Removed ActionType export. Use the exported public action creators actions instead
  • core. Removed export `ActionCommitType
  • core. Renamed type PluginState to DocumentState
  • core. Selectors aren't exported directly anymore. Instead use the new selectors export.
  • core. selectors.serializeRootDocument replaces the previous serializeDocument (selectors.serializeDocument can be used to serialize a non-root document)
  • core. Editor doesn't accept changed anymore. Instead, the optional prop onChange get's called with { changed: boolean, document: DocumentState | null } where changed indicates whether there are pending changes and document is the serialized root document.
  • core. Removed previous exports Document and DocumentProps
  • core. onChange callback now accepts { changed, getDocument() } to avoid serializing the document if not needed
  • plugin-h5p. Removed @edtr-io/plugin-hp5
  • plugin-image. Changed configs for createImagePlugin and removed Upload export
  • plugin-rows. Deprecated PrimarySettingsWrapper now removed. Use PrimarySettings from package editor-ui instead.

Added

  • core. To connect to the store, you can either use the exposed useStore or our newly exposed connect and connectStateOnly. If you want to connect to all editor instances use EditorContext (e.g. with React.useContext)
  • core. Exposes a new Component Document that has to be rendered into an EditorProvider. In contrast to Editor, it accepts an additional prop scope and is not editable by default. Documents sharing the same scope use the same store state.

Changed

  • Various performance improvements
  • core. The exposed hooks now optionally accept the scope. If it is not provided, it uses the scope of the parent Editor

Removed

  • plugin-h5p. Since our serlo.h5p.com trial expired, we don't publish @edtr-io/h5p-plugin anymore

Fixed

  • core. Various fixes to history handling (e.g. resetting to the last persisted state after undoing the last change)
  • plugin-text. Fix positioning of text controls on touch devices

Internal

  • core. Use redux & redux-saga instead of React.useReducer. Since we are passing our own context to redux, you can still use redux in your own application. The store should be considered as an implementation detail
  • core. Replace uuid with shortid

0.6.2 - June 19, 2019

Added

  • editor-ui. Add component PrimarySettings. Use this to wrap Settings displayed directly in page for common styling.

Deprecated

  • plugin-rows. PrimarySettingsWrapper from props passed to children is now deprecated, use PrimarySettings from editor-ui instead.

Fixed

  • plugin-image. Do not lose focus in PrimarySettings
  • plugin-image. Display Placeholder on empty image

0.6.1 - June 13, 2019

Breaking Changes

  • plugin-image. Changed configs for createImagePlugin and removed Upload export

Added

  • core. Added StateType upload for file uploading.

0.6.0 - May 22, 2019

Breaking Changes

  • core. Requires additional peer-dependencies react-dnd@^7.0.0 and react-dnd-html5-backend@^7.0.0

Added

  • core. Editor accepts a new boolean prop omitDragDropContext. If set to true, the editor won't render react-dnd's DragDropContextProvider
  • plugin-files. Add plugin for file uploads
  • plugin-rows. Pass renderIntoExtendedSettings and PrimarySettings as props to children
  • plugin-text. Poweruser-Feature: Add new plugins with /[plugintitle] in editmode

Changed

  • plugin-rows. Adapt styles and controls implemented by schul-cloud, including drag&drop
  • plugin-rows. Add full color theming support

Fixed

  • plugin-text. Fix key conflicts of merge and remove on backspace (#123)
  • plugin-spoiler, plugin-solution, plugin-hint, plugin-equations. Make children traversable

0.5.0 - May 9, 2019

Breaking Changes

  • core. Mark name as required in StatelessEditorProps
  • plugin-image. Image-plugin has new required maxWidth - state property
  • ui. Theming is handled differently. We now differentiate between editor ui elements, renderer ui elements and plugins. Furthermore, we now use a different (but more consistent) naming scheme.
  • ui. Moved editor ui elements (e.g. Button, SettingsOverlay) to the new package @edtr-io/editor-ui.
  • ui. Moved renderer ui elements (e.g. ExpandableBox) to the new package @edtr-io/renderer-ui

Added

  • plugin-h5p. Add H5p.com plugin
  • plugin-image. Add MaxWidth for images
  • plugin-rows. Added more theming options
  • core. Added isEmpty(state: State, id: string) to check if a plugin state is empty
  • core. Added optional function isEmpty: (state: StateDescriptorValueType<S>) => boolean to plugin definition
  • plugin-text. Added visual latex editor
  • plugin-text. Added headings plugin
  • plugin-text. Added list plugin
  • plugin-text. Added colors plugin
  • plugin-text. Added button to wrap in a blockquote plugin
  • plugin-rows. Pass remove and replace functions to childs
  • all. Added plugin icons and descriptions
  • plugin-text. Added Markdownshortcuts for Lists, Headings and Blockquotes.
  • core. Pass plugin props and name of parents to childs too
  • plugin-text. Leave nested Text-Plugins on second Enter key press

Changed

  • plugin-text. Hide placeholder in render mode
  • plugin-text. Hovering Menu for text formatting
  • plugin-text. Styling of inline-overlay improved
  • ui / editor-ui / renderer-ui. Revised theming workflow
  • ui. reworked the ui of several plugins (image, video, anchor, geogebra, h5p, highlight, hint, solution and spoiler)
  • plugin-rows. Improved styling of add menu and controls
  • core. Add new text plugin on Enter and delete empty plugins on backspace and delete

Fixed

  • plugin-image. Hide config-overlay in render mode

Internal

  • demo. Log errors only
  • demo. Add additional examples for plugin-usage in Storybook

0.4.3 - March 29, 2019

Added

  • ui. Add ContainerWithConfigButton component for opening the Settings Overlay.
  • plugin-geogebra. Use ContainerWithConfigButton
  • plugin-equations. Add plugin for aligned equations
  • plugin-hint. Add plugin for hints
  • plugin-image. Use ContainerWithConfigButton
  • plugin-input-exercise. Add plugin for input exercises
  • plugin-sc-mc-exercise. Add plugin for single-choice & multiple-choice exercises
  • plugin-solution. Add plugin for solutions
  • plugin-video. Use ContainerWithConfigButton
  • plugin-text. Merge with previous / next text plugin on backspace / delete when at start / end of plugin

Fixed

  • plugin-geogebra. Scale applet with container size preserving aspect ratio
  • plugin-geogebra. Accept full GeoGebra material link too
  • plugin-image. Center image
  • plugin-text. Display Link-Overlay only when plugin is focused
  • plugin-text. Refocus after bold/italic button click

0.4.2 - March 25, 2019

Added

  • core. Editor now additionally accepts a render callback as children prop
  • core. Added useEditorFocus, useEditorHistory, useEditorMode custom React hooks to simplify the building of a custom ui
  • core. Added Reset action that resets the current editor state to the last persisted value
  • core. Handle focus for all documents
  • core. Added optional onKeyDown callback to plugins which allows plugins to cancel the default editor keydown handlers
  • demo. Added containers to demo storybook. Initially, we have a "plain" container (equivalent to the previosly existing demo) and a "Serlo" container (mocking integration into serlo.org. You can select your preferred container in the storybook's addon panel on the right.
  • core. Added name prop to plugins
  • ui. Added Checkbox, Button and Textarea components for overlay
  • plugin-image. Added onPaste handler accepting jpg, png, bmp, gif, svg
  • plugin-video. Added video plugin

Fixed

  • core. Handle focus in nested documents correctly
  • plugin-rows. Align top and bottom add butons correctly in custom integrations
  • plugin-text. Disable slate undo/redo
  • plugin-text. Refocus after undo/redo

Internal

  • demo. Plugins available to the demo storybook are now defined in demo/src/plugins.tsx
  • demo. Added build-demo task that builds the demo storybook (and deploys it automatically to Netlify). The demo of the master branch is available on https://demo.edtr.io
  • demo. Brand the demo storybook

0.4.1 - March 22, 2019

Added

  • Use Theming in toolbars and menus.

0.4.0 - March 21, 2019

Breaking Changes

  • Moved rows plugin from @edtr-io/ui to @edtr-io/plugin-rows
  • Replaced showOverlay and hideOverlay with an OverlayContext

Added

  • Added InlineOverlay component for plugin controls
  • Added focus previous / focus next actions
  • Added optional getFocusableChildren to stateful plugins, which is used to resolve the previous / next focusable child

Changed

  • plugin-text. Handle focus when using arrow keys

Fixed

  • plugin-text. Focus / blur slate depending on props.focused

0.3.2 - March 14, 2019

Added

  • Added Image plugin
  • Added editable prop to Editor for switching between edit and render mode
  • Added optional onPaste callback to plugins, which is called by the text plugin on paste event

0.3.1 - March 13, 2019

Added

  • Add move Up/Down functionality to Rows plugin
  • Add clipboard to rows plugin add-menu
  • Add Cut / Copy actions to Rows plugin
  • GeoGebra plugin

Changed

  • plugin-spoiler. Remove input element in render mode
  • Settings Overlay now closes with click outside of the modal

Fixed

  • plugin-text. Don't dispatch selection changes anymore

0.3.0 - March 8, 2019

Breaking Changes

  • Removed DocumentIdentifier. You should pass the state to <Editor /> instead
  • Removed state prop from Document. You should pass only the id as id prop instead.
  • Removed value property from StateType.object. The values are now exposed directly on [key].

Added

  • Added a menu for selecting a plugin on insert to rows plugin

Changed

  • State Descriptors uniformly return their value/items/object by invoking the state.

Fixed

  • Only trigger changed if the number of pending changes changed

0.2.1 - February 28, 2019

Added

  • Added Rich-Text plugin
  • Added Anchor plugin
  • Added Blockquote plugin
  • Added Code Highlight plugin
  • Added Spoiler Plugin
  • Added Undo and Redo to reducer
  • Added Persist to reducer
  • Added changed callback to Editor. The callback is called on every Action passing a boolean if the content changed since the last PersistAction was dispatched.

0.2.0 - February 18, 2019

Breaking Changes

  • The newly added <Editor /> replaces the removed <EditorProvider />. It sets up the EditorContext and renders an editor for the given state.
  • Don't export API that isn't intended for external usage anymore.
  • Rename createDocumentIdentifier to createDocument
  • Remove StatefulPlugin.createInitialState in favor of StatefulPlugin.state
  • Plugins no longer receive onChange. Use the provided setters & helpers on state instead

Added

  • Handle serialization and deserialization of documents
  • Add <Editor /> that replaces <EditorProvider />
  • Add StateType.scalar that represents a value of the given type (more specifically: StateType.boolean, StateType.number, StateType.child
  • Add StateType.list, State.object
  • Add slate for rich text and links. Standard Bold + Italic hotkeys supported.

Changed

  • Rename createDocumentIdentifier to createDocument

Removed

  • Remove <EditorProvider /> in favor of <Editor />

0.1.0 - February 8, 2019

Initial release