- Introduced
DOMElement.emit(event, data)for custom events - Improved several Commands (new option
disableCollapsedCursor, disable when cursor on InlineNode) - Surface allows to override core key event handlers via KeyboardManager
- Surface emits
tabevent - Introduced
DocumentChange.info.skipSelectionRerenderto skip rendering the selection - Introduced InsertTableCommand
- Introduced TextInputPackage
- Toolbox now rerenders on every change
- Introduced white-/black-list of commands to control which Commands are available in a specific Surface
- (!) changed the order of
Component.didMount()call, now top-to-down, was bottom-to-up before - InsertNodeCommand now sets cursor into inserted node
- TextPropertyComponent allows to render markers passed via props (as opposed to markers provided by MarkersManager)
- TextPropertyEditor emits 'enter' event
- Improved re-rendering performance
- Improved API for commands and tools
These changes might break your current implementation and may need some migration:
-
Changed behavior of
DefaultDOMElement.parseHTML()andparseXML(): NowDefaultDOMElement.parseHTML()andparseXML()always return the DOM document, i.e., aDOMElementinstance of typedocument. The former behavior was confusing and inconsistent.parseHTML()now always creates a 'full' HTML document, i.e. containing<head>and<body>If you want to parse snippets (as opposed to full documents), use:
let el = DefaultDOMElement.parseSnippet('<p>Lorem ipsum dolor sit amet</p>', 'html') let els = DefaultDOMElement.parseSnippet('Lorem ipsum <b>dolor</b> sit amet', 'xml') ...or... let el = DefaultDOMElement.parseSnippet('<myNode>...</myNode>', 'xml') let els = DefaultDOMElement.parseSnippet('<myNode>...</myNode><myNode>...</myNode>', 'xml')Notice, that
parseSnippetreturns either one element, or an array of elements, depending on the input you provided. -
DOMImporter(HTMLImporter/XMLImporter) takes two mandatory configuration parameters:schemaandconvertersIf you have used theConfiguratorAPI to create importers and exporters, you should be good. -
Changed signature of
DataandInrementalDataconstructor: The second argument is now a node factorynew IncrementalData(schema, this.nodeFactory) -
Removed some API which we don't want to support anymore:
DOMElement.getRoot(): useel.getOwnerDocument()insteadSelection.getFragments(): implementation was overly complicated. If you want to iterate nodes of a container selection usesel.getNodeIds()documentHelpers.getAnnotationsForSelection(): usedocumentHelpers.getPropertyAnnotation()insteadDocument.fromSnapshot(),Document.loadSeed(): both implementations were not reliable. UseJSONConverterinstead.
-
Changed API for configuring editing tools
-
Instead of assigning a
toolGroupto a tool, we assigncommandGroupto a commandconfig.addCommand('heading1', SwitchTextTypeCommand, { spec: { type: 'heading', level: 1 } commandGroup: 'text-types' }) config.addCommand('heading2', SwitchTextTypeCommand, { spec: { type: 'heading', level: 2 }, commandGroup: 'text-types' }) config.addCommand('heading3', SwitchTextTypeCommand, { spec: { type: 'heading', level: 3 }, commandGroup: 'text-types' }) config.addKeyboardShortcut('cmd+alt+1', { command: 'heading1' }) config.addKeyboardShortcut('cmd+alt+2', { command: 'heading2' }) config.addKeyboardShortcut('cmd+alt+3', { command: 'heading3' }) -
Toolbars, overlays, context menus are now configured explicitly via
config.addToolPaneconfig.addToolPanel('main-overlay', [ { type: 'tool-group', commandGroups: ['prompt'] } ]) config.addToolPanel('main-toolbar', [ { name: 'text-types', type: 'tool-dropdown', showDisabled: true, style: 'descriptive', commandGroups: ['text-types'] }, { name: 'annotations', type: 'tool-group', showDisabled: true, style: 'minimal', commandGroups: ['annotations'] }, { name: 'insert', type: 'tool-group', showDisabled: true, style: 'minimal', commandGroups: ['insert'] } ]) -
When no tool component is registered (
config.addTool) for a command,ToggleToolis used.
-
-
DEPRECATIONS:
DocumentChange.isAffected(): UseDocumentChange.hasUpdated()instead
- Advanced drag & drop gestures for adding and moving content
- Spell checking support
- Tables
- Lists
- Introduced generalized concept for overlays
- New imperative editing API
- Overhauled
IsolatedNodeimplementation - Improved ES6 module bundling
- Stabilized Beta 5 features
- Substance is now written in ES6
- More usage options: Use Substance via
<script>tag or use a module bundler of your choice (Rollup, Browserify, Webpack, ...) - Pure CSS instead of SASS for easier integration
- Extracted development environment into substance-bundler tool.
- Extracted test environment into substance-test
- Extracted API docs generator into substance-docgen
- Improved Tool API: Simplified command and tool APIs.
- Commands are now stateless and can be parametrized in the configurator
- Added tool targets: Determines where a tool gets rendered (e.g. in the toolbar or in an overlay)
- Gutter support for ScrollPane: Render tools in a gutter, vertically aligned with the current selection
- Removed experimental list and table packages: They will come back to core as soon as they are completed
- Stabilized Beta 4 features
- Added support for realtime collaboration
- Added persistence interfaces to store versions and snaphots on the server
- Added a package system to provide a simple plugin mechanism
- Introduced the concept of an
IsolatedNodeenabling arbitrary complex editors and external components (such code editors) - Optimized rendering engine
- Enabled server side rendering
- Added support for text macros
- Added
IconProviderto generalize icon usage and make them configurable in packages - Added
LabelProviderfor configurable multi language support - Improved
ProseEditorthat can be extended through packages - Improved
ComponentAPI, with first-class debugging support - Generalized commands and tools
- Added first version of tables and lists
- Improved XML/HTML import/export API
- Ported test suite from
QUnitover totape - Fixed hundreds of issues and bugs
- Improved cross-browser compatibility
- Added many examples documenting core features
- Removed jQuery dependency
- Added a Router implementation that can serialize component states to hash fragments
- Added ui/ScrollPane Component used to wrap any content and make it scrollable within a container (1ae97f9)
- Added ui/TOC as an interface for custom Table of Contents implementations (1ae97f9)
- Added util/server for easier development (7e12ae7)
- Added TabbedPane component (105e80d)
- Added SplitPane component (105e80d)
- Fixed a bug where Firefox ignored input events (e3d6173)
- Fixed an issue in ui/Component where owner and parent were confused (085a695)
- Fixed numerous issues related to mapping DOM selections to model selections
- Fixed a bug where nodes that have no addressable text property could not be rendered
- Fixed an edge case where triple clicking inside a paragraph with inline nodes did not led to an undesired selection
- Fixed an issue where focusedSurface is set too late on the controller
- Fixed an issue where an image wrapped in a selection was not deleted
- Fixed an bug where selection was mapped incorrectly at the end of the paragraph (76eab1f)
- Fixed several converter issues related to XML parsing and serializing (#391)
- Improved API documentation
- Fixed an issue where typing over an inline node did not remove it
- Added ui/Highlights class for distributed management of highlights
- Removed ui/ContentPanel in favor of an improved ScrollPane implementation
- Improved Clipboard: Copy and pasting between browsers now works seamlessly
- ScrollPane is now aware of TOC instances (when provided)
- Simplified Node API: Props are now stored on the node directly
- New source directory and file layout optimized for deep-requiring individual classes
- New DOMElement API for interacting with DOM elements
- Improved Converter API: Now independent from the Article class
- Overhauled API for Tools: Logic now lives in Command implementations that are independent from the UI
- Editors are now Components implementing the Surface API
- CSS overhaul: improved modularity, prefixing to avoid collisions
- New predefined node types: Embed, Superscript, Subscript, Code.
- Removed FormEditor interface in favour of more fine-grained control using new TextPropertyEditor component
- API docs provided via new Substance DocumentationReader
Initial release