fix: Removed Resizable componenet as that breaks Imagevault implementation inside RTE
Approved-by: Michael Zetterberg
This commit is contained in:
20
rte/main.tsx
20
rte/main.tsx
@@ -121,12 +121,14 @@ function loadIV(plugin: ContentstackPluginDefinition) {
|
||||
}
|
||||
}
|
||||
|
||||
async function init() {
|
||||
export default ContentstackSDK.init().then(async (sdk) => {
|
||||
try {
|
||||
const sdk = await ContentstackSDK.init()
|
||||
const extensionObj = await sdk["location"]
|
||||
const RTE = await extensionObj["RTEPlugin"]
|
||||
|
||||
const extensionObj = sdk?.location
|
||||
const RTE = extensionObj?.RTEPlugin
|
||||
if (!RTE) {
|
||||
return
|
||||
}
|
||||
|
||||
let embeddedData: ExtractedContentstackEmbeddedData | null = null
|
||||
const jwtLike = window.name.split("__").find((str) => str.startsWith("ey"))
|
||||
@@ -137,8 +139,6 @@ async function init() {
|
||||
}
|
||||
}
|
||||
|
||||
if (!RTE) return
|
||||
|
||||
const ImageVault = RTE("ImageVault", (rte) => {
|
||||
if (rte) {
|
||||
if (!ivloaded) {
|
||||
@@ -171,7 +171,7 @@ async function init() {
|
||||
)
|
||||
}
|
||||
},
|
||||
display: ["toolbar"],
|
||||
displayOn: ["toolbar"],
|
||||
elementType: ["void"],
|
||||
}
|
||||
})
|
||||
@@ -180,7 +180,7 @@ async function init() {
|
||||
if (rte) {
|
||||
const savedSelection = rte?.selection?.get() ?? undefined
|
||||
|
||||
const appConfig = rte.getConfig()
|
||||
const appConfig = await rte.getConfig()
|
||||
|
||||
// This is the configuration for this instance of the plugin.
|
||||
// You edit this in the content types settings RTE plugin section.
|
||||
@@ -231,6 +231,4 @@ async function init() {
|
||||
} catch (e) {
|
||||
console.error({ e })
|
||||
}
|
||||
}
|
||||
|
||||
export default init()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user