You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use setMediaEmbed in Config and add youtube as a provider, but I can't seem to find any documentation on how to do this.
Looking at the documentation of CKEditor MediaEmbedProvider, it shows a block of JSON is needed. However, the setMediaEmbed method takes List<String> for providers.
Here is what I am trying
Config config = new Config();
List<String> providers = new ArrayList<String>();
String youtubeProvider = "{ name: 'extraProvider', url: /^www.youtube\\.com/(\\w+)/, html: match => '...'}";
providers.add(youtubeProvider);
List<String> empty = new ArrayList<String>();
config.setMediaEmbed(true, providers, empty, empty, empty);
Any help would be so appreciated!
The text was updated successfully, but these errors were encountered:
However, when I tried to set all the other options of setMediaEmbed to empty lists, it still says that the URL is not a valid provider in the editor UI.
Config config = new Config();
List<String> empty = new ArrayList<String>();
config.setMediaEmbed(true, empty, empty, empty, empty);
So, is it possible to ONLY set previewsInData: true through Config setMediaEmbed ?
Hello,
I am trying to use
setMediaEmbed
in Config and add youtube as a provider, but I can't seem to find any documentation on how to do this.Looking at the documentation of CKEditor MediaEmbedProvider, it shows a block of JSON is needed. However, the
setMediaEmbed
method takesList<String>
for providers.Here is what I am trying
Any help would be so appreciated!
The text was updated successfully, but these errors were encountered: