@ckeditor/ckeditor5-media-embed
Advanced tools
Comparing version 19.0.0 to 19.1.0
Changelog | ||
========= | ||
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md. | ||
Changes for the past releases are available below. | ||
## [19.0.0](https://github.com/ckeditor/ckeditor5-media-embed/compare/v18.0.0...v19.0.0) (2020-04-29) | ||
@@ -5,0 +9,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-media-embed", | ||
"version": "19.0.0", | ||
"version": "19.1.0", | ||
"description": "Media Embed feature for CKEditor 5.", | ||
@@ -13,25 +13,20 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-clipboard": "^19.0.0", | ||
"@ckeditor/ckeditor5-core": "^19.0.0", | ||
"@ckeditor/ckeditor5-engine": "^19.0.0", | ||
"@ckeditor/ckeditor5-image": "^19.0.0", | ||
"@ckeditor/ckeditor5-ui": "^19.0.0", | ||
"@ckeditor/ckeditor5-undo": "^19.0.0", | ||
"@ckeditor/ckeditor5-utils": "^19.0.0", | ||
"@ckeditor/ckeditor5-widget": "^19.0.0" | ||
"@ckeditor/ckeditor5-clipboard": "^19.0.1", | ||
"@ckeditor/ckeditor5-core": "^19.0.1", | ||
"@ckeditor/ckeditor5-engine": "^19.0.1", | ||
"@ckeditor/ckeditor5-image": "^19.0.1", | ||
"@ckeditor/ckeditor5-ui": "^19.0.1", | ||
"@ckeditor/ckeditor5-undo": "^19.0.1", | ||
"@ckeditor/ckeditor5-utils": "^19.0.1", | ||
"@ckeditor/ckeditor5-widget": "^19.1.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^19.0.0", | ||
"@ckeditor/ckeditor5-editor-balloon": "^19.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^19.0.0", | ||
"@ckeditor/ckeditor5-link": "^19.0.0", | ||
"@ckeditor/ckeditor5-list": "^19.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^19.0.0", | ||
"@ckeditor/ckeditor5-typing": "^19.0.0", | ||
"eslint": "^5.5.0", | ||
"eslint-config-ckeditor5": "^2.0.0", | ||
"husky": "^1.3.1", | ||
"lint-staged": "^7.0.0", | ||
"stylelint": "^11.1.1", | ||
"stylelint-config-ckeditor5": "^1.0.0" | ||
"@ckeditor/ckeditor5-basic-styles": "^19.0.1", | ||
"@ckeditor/ckeditor5-editor-balloon": "^19.0.1", | ||
"@ckeditor/ckeditor5-editor-classic": "^19.0.1", | ||
"@ckeditor/ckeditor5-link": "^19.0.1", | ||
"@ckeditor/ckeditor5-list": "^19.0.1", | ||
"@ckeditor/ckeditor5-paragraph": "^19.1.0", | ||
"@ckeditor/ckeditor5-typing": "^19.0.1", | ||
"@ckeditor/ckeditor5-table": "^19.1.0" | ||
}, | ||
@@ -48,3 +43,4 @@ "engines": { | ||
"type": "git", | ||
"url": "https://github.com/ckeditor/ckeditor5-media-embed.git" | ||
"url": "https://github.com/ckeditor/ckeditor5.git", | ||
"directory": "packages/ckeditor5-media-embed" | ||
}, | ||
@@ -55,24 +51,3 @@ "files": [ | ||
"theme" | ||
], | ||
"scripts": { | ||
"lint": "eslint --quiet '**/*.js'", | ||
"stylelint": "stylelint --quiet --allow-empty-input 'theme/**/*.css' 'docs/**/*.css'" | ||
}, | ||
"lint-staged": { | ||
"**/*.js": [ | ||
"eslint --quiet" | ||
], | ||
"**/*.css": [ | ||
"stylelint --quiet --allow-empty-input" | ||
] | ||
}, | ||
"eslintIgnore": [ | ||
"src/lib/**", | ||
"packages/**" | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} | ||
] | ||
} |
@@ -5,5 +5,2 @@ CKEditor 5 media embed feature | ||
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-media-embed.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-media-embed) | ||
[![Build Status](https://travis-ci.org/ckeditor/ckeditor5-media-embed.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor5-media-embed) | ||
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5-media-embed/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5-media-embed?branch=master) | ||
<br> | ||
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-media-embed/status.svg)](https://david-dm.org/ckeditor/ckeditor5-media-embed) | ||
@@ -10,0 +7,0 @@ [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-media-embed/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-media-embed?type=dev) |
@@ -132,2 +132,4 @@ /** | ||
if ( !url.match( URL_REGEXP ) ) { | ||
urlRange.detach(); | ||
return; | ||
@@ -138,2 +140,4 @@ } | ||
if ( !mediaRegistry.hasMedia( url ) ) { | ||
urlRange.detach(); | ||
return; | ||
@@ -146,2 +150,4 @@ } | ||
if ( !mediaEmbedCommand.isEnabled ) { | ||
urlRange.detach(); | ||
return; | ||
@@ -159,2 +165,3 @@ } | ||
writer.remove( urlRange ); | ||
urlRange.detach(); | ||
@@ -161,0 +168,0 @@ let insertionPosition; |
@@ -49,5 +49,7 @@ /** | ||
const figure = conversionApi.mapper.toViewElement( data.item ); | ||
const mediaContentElement = [ ...figure.getChildren() ] | ||
.find( child => child.getCustomProperty( 'media-content' ) ); | ||
// TODO: removing it and creating it from scratch is a hack. We can do better than that. | ||
viewWriter.remove( viewWriter.createRangeIn( figure ) ); | ||
// TODO: removing the wrapper and creating it from scratch is a hack. We can do better than that. | ||
viewWriter.remove( mediaContentElement ); | ||
@@ -54,0 +56,0 @@ const mediaViewElement = registry.getMediaViewElement( viewWriter, url, options ); |
@@ -44,9 +44,2 @@ /** | ||
/** | ||
* The form view displayed inside the drop-down. | ||
* | ||
* @member {module:media-embed/ui/mediaformview~MediaFormView} | ||
*/ | ||
this.form = new MediaFormView( getFormValidators( editor.t, registry ), editor.locale ); | ||
// Setup `imageUpload` button. | ||
@@ -56,5 +49,7 @@ editor.ui.componentFactory.add( 'mediaEmbed', locale => { | ||
this._setUpDropdown( dropdown, this.form, command, editor ); | ||
this._setUpForm( this.form, dropdown, command ); | ||
const mediaForm = new MediaFormView( getFormValidators( editor.t, registry ), editor.locale ); | ||
this._setUpDropdown( dropdown, mediaForm, command, editor ); | ||
this._setUpForm( dropdown, mediaForm, command ); | ||
return dropdown; | ||
@@ -108,3 +103,3 @@ } ); | ||
_setUpForm( form, dropdown, command ) { | ||
_setUpForm( dropdown, form, command ) { | ||
form.delegate( 'submit', 'cancel' ).to( dropdown ); | ||
@@ -111,0 +106,0 @@ form.urlInputView.bind( 'value' ).to( command, 'value' ); |
@@ -224,2 +224,3 @@ /** | ||
const attributes = {}; | ||
let viewElement; | ||
@@ -237,3 +238,3 @@ if ( options.renderForEditingView || ( options.renderMediaPreview && this.url && this._previewRenderer ) ) { | ||
return writer.createUIElement( 'div', attributes, function( domDocument ) { | ||
viewElement = writer.createUIElement( 'div', attributes, function( domDocument ) { | ||
const domElement = this.toDomElement( domDocument ); | ||
@@ -250,4 +251,8 @@ | ||
return writer.createEmptyElement( 'oembed', attributes ); | ||
viewElement = writer.createEmptyElement( 'oembed', attributes ); | ||
} | ||
writer.setCustomProperty( 'media-content', true, viewElement ); | ||
return viewElement; | ||
} | ||
@@ -254,0 +259,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
150048
8
60
1674
21