wisemapping-frontend/packages/editor
Clément CREUSAT 20658d3a69 Merged in feature/custom-hook-editor (pull request #74)
feat: add custom hook useEditor to initialize editor

* feat: add custom hook useEditor to initialize editor


Approved-by: Paulo Veiga
2023-11-21 03:00:11 +00:00
..
assets/images Merged in features/move_menu (pull request #47) 2022-03-05 20:09:25 +00:00
cypress Add support for new theme 2023-03-01 22:13:31 -03:00
images Merged in ray-develop (pull request #51) 2022-07-09 01:34:52 +00:00
lang Merged in bugfix/integration-test-webapp (pull request #71) 2023-06-30 13:17:05 +00:00
src Merged in feature/custom-hook-editor (pull request #74) 2023-11-21 03:00:11 +00:00
test Merged in feature/custom-hook-editor (pull request #74) 2023-11-21 03:00:11 +00:00
.eslintrc.json Fix warning on lint 2023-01-14 08:43:06 -08:00
.gitignore Integrate editor as part of webapp. 2022-01-25 18:10:40 +00: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
cypress.config.ts Improve end2end code. 2023-01-14 23:04:33 -08:00
jest.config.js Add app bar tests. 2022-10-11 21:09:02 -07:00
package.json Merged in feature/custom-hook-editor (pull request #74) 2023-11-21 03:00:11 +00:00
README.md Simplify map lock support. 2022-03-23 23:33:44 -03:00
tsconfig.json Add string validation 2023-01-13 22:59:56 -08:00
webpack.common.js Improve webpack config refector common configuration. 2023-01-15 10:40:16 -08:00
webpack.playground.js Update to yarn 3. 2023-01-04 18:23:09 -08:00
webpack.prod.js Update to yarn 3. 2023-01-04 18:23:09 -08: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