You are here

public function OEmbedProcessor::defaultConfiguration in Gutenberg 8.2

Gets default configuration for this processor.

Return value

array The default configuration.

Overrides GutenbergConfigurableBlockProcessorInterface::defaultConfiguration

File

src/BlockProcessor/OEmbedProcessor.php, line 217

Class

OEmbedProcessor
Processes oEmbed blocks.

Namespace

Drupal\gutenberg\BlockProcessor

Code

public function defaultConfiguration() {
  return [
    'oembed' => [
      'maxwidth' => 800,
      'providers' => <<<EOL
#https?://(www\\.)?youtube.com/watch.*#i | http://www.youtube.com/oembed | true
#https?://youtu\\.be/\\w*#i | http://www.youtube.com/oembed | true
#https?://(www\\.)?vimeo\\.com/\\w*#i | http://vimeo.com/api/oembed.json | true
#http://(www\\.)?hulu\\.com/watch/.*#i | http://www.hulu.com/api/oembed.json | true
#https?://(www\\.)?twitter.com/.+?/status(es)?/.*#i | https://api.twitter.com/1/statuses/oembed.json | true
#https?://(www\\.)?instagram.com/p/.*#i | https://api.instagram.com/oembed | true
#https?:\\/\\/(www\\.)?google\\.com\\/maps\\/embed\\?pb\\=.*#i | http://open.iframe.ly/api/oembed | true
#https?://maps.google.com/maps.*#i | google-maps | LOCAL
#https?://docs.google.com/(document|spreadsheet)/.*#i | google-docs | LOCAL
EOL
,
    ],
  ];
}