Jons
Jons
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
yeah, sure, my system development is almost ready, I have to do some data entry and maybe some advanced feature to add later, thank you 🙂
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
Ok, thank you!
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
In any case thank you for your response, I will wait for a core update of foundry if that is the problem
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
I don't know if something important is missing there, I will do more digging later
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
In case of dropping into a journal entry the array of plugins contains 16 elements, in the other case has only 14 plugins
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
someProp(propName, f) {
let prop = this._props && this._props[propName], value;
if (prop != null && (value = f ? f(prop) : prop))
return value;
for (let i = 0; i < this.directPlugins.length; i++) {
let prop = this.directPlugins[i].props[propName];
if (prop != null && (value = f ? f(prop) : prop))
return value;
}
let plugins = this.state.plugins;
if (plugins)
for (let i = 0; i < plugins.length; i++) {
let prop = plugins[i].props[propName];
if (prop != null && (value = f ? f(prop) : prop))
return value;
}
}
someProp(propName, f) {
let prop = this._props && this._props[propName], value;
if (prop != null && (value = f ? f(prop) : prop))
return value;
for (let i = 0; i < this.directPlugins.length; i++) {
let prop = this.directPlugins[i].props[propName];
if (prop != null && (value = f ? f(prop) : prop))
return value;
}
let plugins = this.state.plugins;
if (plugins)
for (let i = 0; i < plugins.length; i++) {
let prop = plugins[i].props[propName];
if (prop != null && (value = f ? f(prop) : prop))
return value;
}
}
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
It seems that the difference is in this function here from foundry-esm
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
Ok, I want to add some other info: Dropping a compendium item into a journal entry works fine, so I tried to understand what is the difference
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
The TinyMCE version follows a totally different call stack so I'm a bit confused. I can try to understand if there is something broken in foundry v12
15 replies
TTyphonJS
Created by TyphonJS (Michael) on 8/7/2024 in #typhonjs-runtime
ProseMirror UUID discussion
Sure. When I drop some Item data into ProseMirror editor I got whis Uncaught Error in console:
foundry-esm.js:3571 Uncaught Error: Invalid number of embedded UUID parts
at Object.parseUuid (foundry-esm.js:3571:37)
at fromUuidSync (foundry.js:4915:72)
at #transformUUID (TJSPasteUUID.js:45:40)
at Plugin.transformPastedText (TJSPasteUUID.js:26:53)
at foundry-esm.js:27810:62
at EditorView.someProp (foundry-esm.js:30441:52)
at parseFromClipboard (foundry-esm.js:27810:16)
at editHandlers.drop (foundry-esm.js:28704:19)
at view.dom.addEventListener.view.input.eventHandlers.<computed> (foundry-esm.js:28059:19)
foundry-esm.js:3571 Uncaught Error: Invalid number of embedded UUID parts
at Object.parseUuid (foundry-esm.js:3571:37)
at fromUuidSync (foundry.js:4915:72)
at #transformUUID (TJSPasteUUID.js:45:40)
at Plugin.transformPastedText (TJSPasteUUID.js:26:53)
at foundry-esm.js:27810:62
at EditorView.someProp (foundry-esm.js:30441:52)
at parseFromClipboard (foundry-esm.js:27810:16)
at editHandlers.drop (foundry-esm.js:28704:19)
at view.dom.addEventListener.view.input.eventHandlers.<computed> (foundry-esm.js:28059:19)
The parseUuid function has been called with these params:
{
"uuid": "{\"type\":\"Item\",\"uuid\":\"Compendium.fabulaultima.conditions.Item.6CQ3nO3ZLl148GMQ\"}"
}
{
"uuid": "{\"type\":\"Item\",\"uuid\":\"Compendium.fabulaultima.conditions.Item.6CQ3nO3ZLl148GMQ\"}"
}
Reading the function implementation, it seems that the function expects the string part of uuid as input "Compendium.fabulaultima.conditions.Item.6CQ3nO3ZLl148GMQ", and not a serialized json. That's the problem. So can you confirm that is all happening inside foundry? (sorry, I'm a experienced developer, but I'm still quite new to foundry development and I still have to understand what belongs to core foundry and what to TJS) I noticed that a TJS module is involved in the call stack (TJSPasteUUID.js) wich receive that input and pass it into parseUuid function Some other info: 1. I tried to switch to <TJSTinyMCE> component and it works 2. I'm using foundry v12
15 replies