wisemapping-frontend/packages/editor
Gonzalo Martinez 2370faea62 Merged in mindplot-webcomponent (pull request #57)
Mindplot webcomponent

* styles in js file

* editor now uses bootstrap widget manager

* fix console error: preventDefault on pasive events

* Mode as webcomponent parámeter. Rename of init method

* fix merge

* Mindplot webcomponent documentation

* fix

* remove comments

* delete comments

* Merged in Alejandro-Raiczyk/just-details-1661445571189 (pull request #56)

just details

Approved-by: Paulo Veiga
2022-08-26 01:35:59 +00:00
..
assets/images Merged in features/move_menu (pull request #47) 2022-03-05 20:09:25 +00:00
cypress Format JS files. 2022-07-12 18:58:11 -07:00
images Merged in ray-develop (pull request #51) 2022-07-09 01:34:52 +00:00
lang Merged in ray-develop (pull request #51) 2022-07-09 01:34:52 +00:00
src Merged in mindplot-webcomponent (pull request #57) 2022-08-26 01:35:59 +00:00
test/playground Merged in mindplot-webcomponent (pull request #57) 2022-08-26 01:35:59 +00:00
.babelrc Integrate editor as part of webapp. 2022-01-25 18:10:40 +00:00
.gitignore Integrate editor as part of webapp. 2022-01-25 18:10:40 +00:00
cypress.json Integrate editor as part of webapp. 2022-01-25 18:10:40 +00:00
package.json yarn update 2022-04-07 14:06:26 -03:00
README.md Simplify map lock support. 2022-03-23 23:33:44 -03:00
tsconfig.json Merged in features/move_menu (pull request #47) 2022-03-05 20:09:25 +00:00
webpack.common.js Format JS files. 2022-07-12 18:58:11 -07:00
webpack.playground.js Format JS files. 2022-07-12 18:58:11 -07:00
webpack.prod.js Format JS files. 2022-07-12 18:58:11 -07: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