Foren

ReactJS in Liferay portlet

david simonyi, geändert vor 6 Jahren.

ReactJS in Liferay portlet

New Member Beitrag: 1 Beitrittsdatum: 19.05.17 Neueste Beiträge
Hey, had anyone tried to implement react app to liferay portlet? If so, can you guide me through this please? Thanks in advance
Isabel Jason, geändert vor 6 Jahren.

RE: ReactJS in Liferay portlet Issue

New Member Beiträge: 2 Beitrittsdatum: 04.08.17 Neueste Beiträge
Hello I endeavored to utilize AllowEditor with React however I have blunders in my program support?

Cannot read property 'add' of undefined in alloy-editor-no-react.js:12062
Cannot set property 'dir' of undefined in alloy-editor-no-react.js:237

I read I perhaps need to rethink window.ALLOYEDITOR_BASEPATH and AlloyEditor.regexBasePath yet I don't know precisely what to compose.
I tried this regex AlloyEditor.regexBasePath = /nodes_modules/alloyeditor/dist/alloy-editor/allow-editor-no-react-min.js/ but it does not work.

My javascript is arranged with webpack and this is the code I use to instate it :
import "!style!file!css!alloyeditor/dist/alloy-editor/assets/alloy-editor-moono-min.css"

import React, { Component } from "react"
import AlloyEditor from "alloyeditor"

export default class Editor extends Component {
componentDidMount() {
this._editor = AlloyEditor.editable(this.refs.container
}

componentWillUnmount() {
this._editor.destroy()
}

render() {
return (
<div ref="container">
Test
</div>
)
}
}
The introduction appears work on the grounds that my compartment is changed to a substance editable segment. Be that as it may, I have just a textearea.
thumbnail
David H Nebinger, geändert vor 6 Jahren.

RE: ReactJS in Liferay portlet

Liferay Legend Beiträge: 14915 Beitrittsdatum: 02.09.06 Neueste Beiträge
Yes it has been done and yes there are examples if you look for them:

https://www.google.com/search?client=opera&q=liferay+react+portlet&sourceid=opera&ie=UTF-8&oe=UTF-8









Come meet me at Devcon 2017 or 2017 LSNA!