When using dtable-ui-component component library, you need to import dtable-font font icon.
- If the dtable-font font icon has been referenced in the application, dtable-ui-component can be used directly
- If the dtable-font font icon is not referenced in the application, you need to import the corresponding font icon when using dtable-ui-component
import { CollaboratorEditor } from 'dtable-ui-component';
import 'dtable-ui-component/assets/dtable-font.css';
If your UI component requires localization, you need to call the localization function.
import { setLocale } from 'dtable-ui-component/lib/lang';
let lang = 'en';
setLocale(lang);
If you want to use on-demand loading, you need to install the following third-party libraries.
npm install babel-plugin-import --save-dev
then add the following content to the .babelrc
file of your project
{
"plugins": [
[
"import", {
"libraryName": "dtable-ui-component",
"libraryDirectory": "lib",
"camel2DashComponentName": false,
"camel2UnderlineComponentName": false
},
"dtable-ui-component"
],
]
}
If your project only uses a simple long text formatter, you can reference the SimpleLongTextFormatter component.
import { SimpleLongTextFormatter } from 'dtable-ui-component';