This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ckeditor/t/1
Feature: The basic media embed feature. Closes #1.
- Loading branch information
Showing
31 changed files
with
3,792 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
/* globals window */ | ||
|
||
import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor'; | ||
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed'; | ||
|
||
ClassicEditor.builtinPlugins.push( MediaEmbed ); | ||
|
||
window.ClassicEditor = ClassicEditor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div id="snippet-media-embed"> | ||
<h3>YouTube</h3> | ||
|
||
<figure class="media"> | ||
<oembed url="https://www.youtube.com/watch?v=DgM5DfAPQTI"></oembed> | ||
</figure> | ||
|
||
<h3>Vimeo</h3> | ||
|
||
<figure class="media"> | ||
<oembed url="https://vimeo.com/1084537"></oembed> | ||
</figure> | ||
|
||
<h3>Twitter</h3> | ||
|
||
<figure> | ||
<oembed url="https://twitter.com/ckeditor/status/1027571541989572612"></oembed> | ||
</figure> | ||
|
||
<h3>Google Maps</h3> | ||
|
||
<figure class="media"> | ||
<oembed url="https://www.google.com/maps/place/Poland/@51.9537505,19.1343786,6z/data=!3m1!4b1!4m5!3m4!1s0x47009964a4640bbb:0x97573ca49cc55ea!8m2!3d51.919438!4d19.145136?hl=en"></oembed> | ||
</figure> | ||
</div> | ||
|
||
<style> | ||
.ck.ck-content .media iframe { | ||
/* Override default Umberto guide styles. */ | ||
margin: 0; | ||
} | ||
|
||
input.example-input { | ||
min-width: 600px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
/* globals ClassicEditor, console, window, document */ | ||
|
||
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#snippet-media-embed' ), { | ||
cloudServices: CS_CONFIG, | ||
toolbar: { | ||
items: [ | ||
'mediaEmbed', '|', 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo' | ||
], | ||
viewportTopOffset: 60 | ||
}, | ||
mediaEmbed: { | ||
semanticDataOutput: true | ||
} | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
category: api-reference | ||
--- | ||
|
||
# Media embed feature for CKEditor 5 | ||
|
||
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-media-embed.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-media-embed) | ||
|
||
This package implements the media embed feature for CKEditor 5. | ||
|
||
## Documentation | ||
|
||
See the {@link features/media-embed Media embed feature} guide and the {@link module:media-embed/mediaembed~MediaEmbed} plugin documentation. | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install --save @ckeditor/ckeditor5-media-embed | ||
``` | ||
|
||
## Contribute | ||
|
||
The source code of this package is available on GitHub in https://github.com/ckeditor/ckeditor5-media-embed. | ||
|
||
## External links | ||
|
||
* [`@ckeditor/ckeditor5-media-embed` on npm](https://www.npmjs.com/package/@ckeditor/ckeditor5-media-embed) | ||
* [`ckeditor/ckeditor5-media-embed` on GitHub](https://github.com/ckeditor/ckeditor5-media-embed) | ||
* [Issue tracker](https://github.com/ckeditor/ckeditor5-media-embed/issues) | ||
* [Changelog](https://github.com/ckeditor/ckeditor5-media-embed/blob/master/CHANGELOG.md) |
Oops, something went wrong.