-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-30732: As an Editor I want be able to add embed/images inside table cells #1034
base: 1.5
Are you sure you want to change the base?
Changes from 4 commits
7a97f04
c40b66c
8b3687b
9e8739d
2a38bb2
0a812c4
e95e1d9
82a77c2
419b3fd
6936bb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ const ZERO_WIDTH_SPACE = '​'; | |
init: function(editor) { | ||
editor.ezembed = { | ||
canBeAdded: () => { | ||
const path = editor.elementPath(); | ||
|
||
return !path || path.contains('table', true) === null; | ||
console.warn('[DEPRECATED] canBeAdded method is deprecated'); | ||
console.warn('[DEPRECATED] it will be removed from ezplatform-admin-ui 2.0'); | ||
return true; | ||
}, | ||
}; | ||
|
||
|
@@ -64,7 +64,6 @@ const ZERO_WIDTH_SPACE = '​'; | |
}, | ||
|
||
insertWrapper: function(wrapper) { | ||
this.editor.insertHtml(ZERO_WIDTH_SPACE); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the fix for https://jira.ez.no/browse/EZP-29882 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dew326 sorry, but this line causes errors: in some cases, the generated XML is invalid because of zero-width space. I tried to reproduce the mentioned issue and wasn't able to do so. Seems like inline embed functionality changed: user don't provide any text. @barbaragr can you please check this one also? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dew326 is right, regression could occur if we merged it: https://recordit.co/gtMfFuBtyl https://jira.ez.no/browse/EZP-29882 doesn't work here. |
||
this.editor.insertElement(wrapper); | ||
}, | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is not needed anymore so we can remove it in 3.0 for BC we need to keep it in 2.5.x.
Please add the deprecation information:
The usage of this method can be safely removed from our buttons:
https://github.com/ezsystems/ezplatform-admin-ui/blob/master/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-image.js#L60 and https://github.com/ezsystems/ezplatform-admin-ui/blob/master/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-embed.js#L58
Please remove the disable state and the method
isDisabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All requested changes are done. Also a deprecation warning for
EzBtnImage.isDisabled
andEzBtnEmbed.isDisabled
was added: 8b3687b