Skip to content

Commit

Permalink
upgrades TinyMce
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Apr 18, 2023
1 parent 5f9a3a4 commit b9a49ae
Show file tree
Hide file tree
Showing 95 changed files with 1,087 additions and 3,737 deletions.
85 changes: 31 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"babel-loader": "^8.0.0",
"bootstrap": "^3.4.1",
"classnames": "^2.2.5",
"codemirror": "^5.34.0",
"core-js": "^3.26.1",
"cssnano": "^4.1",
"d3": "^4.4.0",
Expand Down Expand Up @@ -53,17 +52,15 @@
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"shelljs": "^0.5.3",
"svg4everybody": "^2.1.2",
"swagger-ui-react": "3.51.2",
"tinycolor2": "^1.4.1",
"tinymce": "^4.9.3",
"tinymce-codemirror": "git+https://github.com/christiaan/tinymce-codemirror.git#20c1bbe708",
"tinymce": "^6.3",
"@tinymce/tinymce-react": "^4.2",
"uuid": "^9.0.0",
"video.js": "7.7.4",
"wavesurfer.js": "2.2.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"whatwg-fetch": "^2.0.1"
"webpack-cli": "^5.0.1"
},
"files": [
"package.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ FormWrapper.defaultProps = {
embedded: false
}

// TODO : maybe manage ContentMeta display here

class Form extends Component {
constructor(props) {
super(props)
Expand Down
3 changes: 3 additions & 0 deletions src/main/app/Resources/modules/content/form/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ actions.getItemLock = (className, id) => (dispatch) => {
dispatch({
[API_REQUEST]: {
url: ['apiv2_object_lock_get', {class: className, id}],
silent: true,
request: {
method: 'GET'
},
Expand Down Expand Up @@ -84,6 +85,7 @@ actions.validateLock = (lock) => (dispatch, getState) => {
actions.lockItem = (className, id) => ({
[API_REQUEST]: {
url: ['apiv2_object_lock', {class: className, id}],
silent: true,
request: {
method: 'PUT'
}
Expand All @@ -93,6 +95,7 @@ actions.lockItem = (className, id) => ({
actions.unlockItem = (className, id) => ({
[API_REQUEST]: {
url: ['apiv2_object_unlock', {class: className, id}],
silent: true,
request: {
method: 'PUT'
}
Expand Down
16 changes: 13 additions & 3 deletions src/main/app/Resources/modules/data/types/choice/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import differenceBy from 'lodash/differenceBy'
import get from 'lodash/get'

import {trans, tval} from '#/main/app/intl/translation'

import {ChoiceInput} from '#/main/app/data/types/choice/components/input'
import {ChoiceSearch} from '#/main/app/data/types/choice/components/search'
import {makeId} from '#/main/core/scaffolding/id'

const dataType = {
name: 'choice',
Expand All @@ -28,12 +30,20 @@ const dataType = {
label: trans('condensed_display')
}, {
name: 'choices',
type: 'enum',
type: 'collection',
label: trans('choices_list'),
calculated: (data) => {
//get(data, 'options.choices', [])
console.log(data)
// data ? data.map(choice => choice.value) : []
return get(data, 'options.choices', []).map(choice => choice.value)
},
options: {
type: 'string',
placeholder: trans('no_choice'),
addButtonLabel: trans('add_a_choice'),
unique: true
button: trans('add_a_choice'),
unique: true,
defaultItem: {id: makeId(), value: ''}
},
required: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class HtmlInput extends Component {
<Tinymce
id={this.props.id}
placeholder={this.props.placeholder}
content={this.props.value || ''}
value={this.props.value || ''}
workspace={this.props.workspace}
disabled={this.props.disabled}
onChange={this.props.onChange}
Expand Down
Loading

0 comments on commit b9a49ae

Please sign in to comment.