-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Integrate caption with basicstyles plugin #1559
Conversation
4a60cc1
to
748f4ed
Compare
Note this PR has to be rebased onto major, as EI feature has been already merged. |
Rebased on |
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.
plugins/imagebase/plugin.js
Outdated
@@ -554,11 +554,18 @@ | |||
} ); | |||
} | |||
|
|||
// In Firefox and Edge applying styles inside caption results | |||
// in firing this listener without focused widget. | |||
// However it could be obtained from element, on which the event took place. |
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.
Maybe issue reference could be useful here?
@@ -0,0 +1,24 @@ | |||
@bender-tags: 4.9.0, feature, 932, tp3384 |
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.
Could you update version tag to 4.9.1
?
@@ -0,0 +1,24 @@ | |||
@bender-tags: 4.9.0, feature, 932, tp3384 | |||
@bender-ui: collapsed | |||
@bender-ckeditor-plugins: sourcearea, wysiwygarea, toolbar, imagebase, link, htmlwriter, elementspath, basicstyles |
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.
Are link, htmlwriter, elementspath
plugins needed here?
|
||
* Bold is applied. | ||
* There is no visible placeholder. | ||
* Firefox/Edge: Selection remains inside the caption. |
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.
Isn't it expected result for all browsers?
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.
I meant "check it especially in Firefox and Edge", but, yeah, does not make much sense.
plugins/imagebase/plugin.js
Outdated
@@ -586,16 +593,26 @@ | |||
* @private | |||
* @member CKEDITOR.plugins.imagebase.featuresDefinitions.caption | |||
* @param {CKEDITOR.dom.element} sender The element that this function should be called on. | |||
* @param {Boolean} [isFocused] Indicates if current widget should be treated as a focused one. |
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.
As it will land on different version than one in which imagebase
plugin was introduced we should state here since
which version this param is available.
a023416
to
02a7834
Compare
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.
@@ -435,6 +435,33 @@ | |||
onFocus: function( widget ) { | |||
assert.isNotMatching( /Enter image caption/, widget.editor.getData() ); | |||
} | |||
} ), | |||
|
|||
// #1646 |
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.
It should be // (#1646)
- https://docs.ckeditor.com/ckeditor4/latest/guide/dev_tests.html#tagging-tests
</div> | ||
|
||
<script> | ||
var cfg = { |
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 test does not work (the divarea editor to be precise) on IE8. AFAIR, imagebase
is not supposed to work on IE8 so it should be ignored probably.
As it now targets |
I've updated due to changes made in #1793. |
981f6da
to
d387933
Compare
Rebased onto latest |
What is the purpose of this pull request?
Bug fix
Does your PR contain necessary tests?
All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.
This PR contains
What changes did you make?
I've broaden check for caption (now it's check if an element is a caption or is inside a caption). I've also introduced mechanism to force treating widget as a focused one (via the second parameter to the
_refreshCaption
private method).Closes #1646.