Hi,
I can't use 'tinymce.activeEditor.windowManager.open'.
I'm looking at the API Reference but I get an error.
I can't use only open().
I can use alert() and confirm().
Bug?
https://www.tiny.cloud/docs/api/tinymce/tinymce.windowmanager/
Tinymce Version: 5.0.2.
銆嘐rror
theme.min.js:9 Uncaught Error: Errors:
Failed path: (dialog)
Could not find valid strict value for "title" in {
"url": "file.html",
"width": 320,
"height": 240
},Failed path: (dialog)
Could not find valid strict value for "body" in {
"url": "file.html",
"width": 320,
"height": 240
},Failed path: (dialog)
Could not find valid strict value for "buttons" in {
"url": "file.html",
"width": 320,
"height": 240
}
Input object: {
"url": "file.html",
"width": 320,
"height": 240
}
at theme.min.js:9
at Object.fold (theme.min.js:9)
at Yo (theme.min.js:9)
at aA (theme.min.js:9)
at Object.open (theme.min.js:9)
at r (theme.min.js:9)
at Object.open (theme.min.js:9)
at Object.open (tinymce.min.js:9)
at Yx.file_picker_callback (config.js:31)*
You've got a couple issues here. The first is that height and width are no longer valid properties, so you need to use size which accepts normal, medium or large (normal is the default). The second issue, is that you're missing various required properties (eg: a title property), which is mentioned in the console errors. The last issue, is that you're trying to use URL dialogs which aren't supported in v5 at this stage. We have https://github.com/tinymce/tinymce/issues/4786 open at the moment to look at bringing similar functionality back in v5.
It might also be useful to read the new dialog docs we created for v5:
thank you.
For future readers , you have to use the openUrl method:
https://www.tiny.cloud/docs/ui-components/urldialog/
tinymce.activeEditor.windowManager.openUrl({
title: 'Just a title',
url: 'http://www.tiny.cloud/example.html'
});
Most helpful comment
For future readers , you have to use the openUrl method:
https://www.tiny.cloud/docs/ui-components/urldialog/