wisemapping-frontend/packages/editor
Paulo Gustavo Veiga 66dd64e40f Update snapshot
2022-12-17 21:31:56 -08:00
..
assets/images Merged in features/move_menu (pull request #47) 2022-03-05 20:09:25 +00:00
cypress Update snapshot 2022-12-17 21:31:56 -08:00
images Merged in ray-develop (pull request #51) 2022-07-09 01:34:52 +00:00
lang Add missing translations 2022-11-12 09:49:04 -08:00
src Change from back to absolute URL. 2022-12-17 17:23:46 -08:00
test Fix NPE on load. 2022-11-30 19:12:28 -08:00
.eslintrc.json Add lint to editor 2022-11-02 18:17:00 -07:00
.gitignore Refactor editor init 2022-01-24 17:22:39 -03:00
.prettierignore Add lint to editor 2022-11-02 18:17:00 -07:00
.prettierrc.json Add lint to editor 2022-11-02 18:17:00 -07:00
babel.config.json Add app bar tests. 2022-10-11 21:09:02 -07:00
cypress.config.ts Add test on push 2022-12-04 21:47:16 -08:00
jest.config.js Add app bar tests. 2022-10-11 21:09:02 -07:00
package.json Add test on push 2022-11-30 22:12:40 -08:00
README.md Simplify map lock support. 2022-03-23 23:33:44 -03:00
tsconfig.json WIP 2022-11-24 00:07:16 -08:00
webpack.common.js Dependencies cleanup 2022-11-12 15:17:06 +00:00
webpack.playground.js Merged in editor-actions-by-mode (pull request #63) 2022-10-07 01:58:24 +00:00
webpack.prod.js Dependencies cleanup 2022-11-12 15:17:06 +00:00
yarn.lock refactor: support lerna, include @wisemapping/login into webapp 2020-12-05 02:47:02 -05:00

Editor

React Component for the wisemapping editor.

Usage

This is a work in progress and for now mindplot needs to be instantiated using the initCallback prop. Check test/playground/map-render for some usage examples.

import Editor from `@wisemapping/editor`;

ReactDOM.render(
    <Editor 
        mapId={1}
        readOnlyMode={false}
        locale="en"
        onAction={(action) => console.log('action called:', action)}
        initCallback={initialization}
    />,
    document.getElementById('root'),
);

i18n

Messages are translated in the lang folder, and then compiled to src/compiled-lang using the following command:

yarn compile lang/de.json --ast --out-file src/compiled-lang/de.json