Skip to content

Commit 9ea5831

Browse files
committed
Improvements to Text Editor and Relation Fields
1 parent 4d2a473 commit 9ea5831

File tree

5 files changed

+36
-30
lines changed

5 files changed

+36
-30
lines changed

js/classes/media.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import { IconPicture } from '@codexteam/icons';
2+
13
export default class Media {
24

35
static get toolbox() {
46
return {
57
title: 'Media',
6-
icon: '<svg width="16" height="13" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M608 0H160a32 32 0 0 0-32 32v96h160V64h192v320h128a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zM232 103a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm352 208a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm-168 57H32a32 32 0 0 0-32 32v288a32 32 0 0 0 32 32h384a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM96 224a32 32 0 1 1-32 32 32 32 0 0 1 32-32zm288 224H64v-32l64-64 32 32 128-128 96 96z"></path></svg>'
8+
icon: IconPicture
79
}
810
}
911

js/components/fields/RelationField.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ export default {
141141
}
142142
},
143143
getItemName(item) {
144-
const namekey = this.options.namekey ? this.options.namekey : 'name'
145-
return this.translated ? item[namekey][this.$root.appLocale] : item[namekey]
144+
const namekey = this.options.namekey ? this.options.namekey : 'name',
145+
idkey = this.options.idkey ? this.options.idkey : 'id'
146+
return '#' + item[idkey] + '' + (this.translated ? item[namekey][this.$root.appLocale] : item[namekey])
146147
},
147148
invokeEnter() {
148149
if(this.selectedItem != null) {

js/components/fields/TextEditorField.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Table from '@editorjs/table'
3030
import Underline from '@editorjs/underline'
3131
import Warning from '@editorjs/warning'
3232
import Hyperlink from 'editorjs-hyperlink'
33-
import Style from 'editorjs-style'
33+
import { StyleInlineTool } from 'editorjs-style'
3434
3535
import Media from '../../classes/media'
3636
@@ -122,7 +122,7 @@ export default {
122122
marker: Marker,
123123
underline: Underline,
124124
hyperlink: Hyperlink,
125-
style: Style
125+
style: StyleInlineTool
126126
},
127127
i18n: {
128128
messages: {

package-lock.json

Lines changed: 25 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "umomega-foundation",
3-
"version": "1.21.2",
3+
"version": "1.21.4",
44
"description": "UI Foundation For umΩ Apps",
55
"sass": "foundation-ui.sass",
66
"main": "foundation-ui.js",
@@ -54,8 +54,8 @@
5454
"axios": "^0.27.2",
5555
"axios-progress-bar": "^1.2.0",
5656
"cash-dom": "^8.1.1",
57-
"editorjs-hyperlink": "^1.0.6",
58-
"editorjs-style": "^2.2.0",
57+
"editorjs-hyperlink": "github:Hyleeh/editorjs-hyperlink",
58+
"editorjs-style": "^3.0.0",
5959
"lang.js": "^1.1.14",
6060
"luxon": "^1.28.0",
6161
"moment": "^2.29.4",

0 commit comments

Comments
 (0)