Installation
Rather than installing multiple scoped packages, the remirror
package is a gateway to using all the goodness that remirror provides while minimising your bundle size.
Use the installation instruction outlined below, depending on the package manager used in your project.
::: note
The additional requirement to install the dependency @remirror/pm
has been removed and it will automatically be installed for you when consuming remirror
. You can still install it if you wish since it is a peer dependency for all scoped @remirror
packages which interact with prosemirror-*
APIs. It ensures consistent library versions across the ecosystem and can simplify your codebase.
:::
Required styles
Remirror requires styles for the editor to function correctly across different browsers. These styles can be added in the following ways:
With plain css:
Or with @emotion/styled
:
Or with styled-components
:
Or with emotion
and the DOM.
In order to use the styled-components
or emotion
variants you will need to also install @remirror/styles@next
.
Browser support
Remirror aims to be compatible with all browsers released since 2017.
If you are using remirror with a project like next.js
or gatsby
you will also need to add the following browserlist configuration.
To use this configuration in your own project you can add the following to your package.json
file. Tools like babel
and postcss
are aware of this configuration.
You can also use a .browserlistrc
file.
The main reason for this configuration is to support class syntax properly. Projects like next.js
automatically compile your code down to es5
which causes problems when extending classes. If you don't plan on creating your own extensions or presets, you can ignore this requirement.