Skip to content

Commit

Permalink
Merge branch 't/1348' of github.com:ckeditor/ckeditor-dev into t/1348
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekbogdanski committed Feb 16, 2018
2 parents d42190c + f8fbeb9 commit a0431c3
Show file tree
Hide file tree
Showing 337 changed files with 11,086 additions and 406 deletions.
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## Are you reporting a feature request or a bug?

<!--
Replace this comment with your issue type: Bug / Feature request / Other, please explain.
Before reporting your issue make sure there are no duplicates already reported.
Please **do not report security issues here**, use the contact form at https://ckeditor.com/contact/ instead.
-->

## [Check if the issue is already reported](https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_issues_readme-section-avoid-duplicates)
*Put all reference links here…*
Replace this comment with your issue type: Bug / Feature request / Other, please explain.
-->

## Provide detailed reproduction steps (if any)

Expand Down
59 changes: 42 additions & 17 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,57 @@

New Features:

* [#932](https://github.com/ckeditor/ckeditor-dev/issues/932): Introduced Easy Image feature for inserting images that are automatically rescaled, optimized, responsive and delivered through a blazing-fast CDN. Three new plugins were added to support it:
* [Easy Image](https://ckeditor.com/cke4/addon/easyimage),
* [Cloud Services](https://ckeditor.com/cke4/addon/cloudservices)
* [Image Base](https://ckeditor.com/cke4/addon/imagebase)
* [#1338](https://github.com/ckeditor/ckeditor-dev/issues/1338): Keystroke labels are displayed for function keys (like F7, F8).
* [#933](https://github.com/ckeditor/ckeditor-dev/issues/933): [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin can now upload files using XHR requests. This allows for setting custom HTTP headers using [`config.fileTools_requestHeaders`](http://docs.ckeditor.test/#!/api/CKEDITOR.config-cfg-fileTools_requestHeaders) configuration option.
* [#1365](https://github.com/ckeditor/ckeditor-dev/issues/1365): [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin uses XHR requests by default.
* [#1399](https://github.com/ckeditor/ckeditor-dev/issues/1399): Added possibility to set [`CKEDITOR.config.startupFocus`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.config-cfg-startupFocus) as `start` or `end` to specify where editor focus should be after initialization.
* [#1441](https://github.com/ckeditor/ckeditor-dev/issues/1441): [Magic Line](https://ckeditor.com/cke4/addon/magicline) line element can now be identified by `data-cke-magic-line="1"` attribute.
* [#933](https://github.com/ckeditor/ckeditor-dev/issues/933): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin can now upload files using XHR requests. This allows for setting custom HTTP headers using the [`config.fileTools_requestHeaders`](http://docs.ckeditor.test/#!/api/CKEDITOR.config-cfg-fileTools_requestHeaders) configuration option.
* [#1365](https://github.com/ckeditor/ckeditor-dev/issues/1365): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin uses XHR requests by default.
* [#1399](https://github.com/ckeditor/ckeditor-dev/issues/1399): Added the possibility to set [`CKEDITOR.config.startupFocus`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.config-cfg-startupFocus) as `start` or `end` to specify where the editor focus should be after the initialization.
* [#1441](https://github.com/ckeditor/ckeditor-dev/issues/1441): The [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin line element can now be identified by the `data-cke-magic-line="1"` attribute.

Fixed Issues:

* [#869](https://github.com/ckeditor/ckeditor-dev/issues/869): Fixed: Empty selection clears cached clipboard data in editor.
* [#1419](https://github.com/ckeditor/ckeditor-dev/issues/1419): Fixed: [Widged Selection](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.plugins.widgetselection) selects editor content with `alt + a` key combination on Windows.
* [#1274](https://github.com/ckeditor/ckeditor-dev/issues/1274): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not match a single selected image using [`contextDefinition.cssSelector`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.plugins.balloontoolbar.contextDefinition-property-cssSelector) matcher.
* [#595](https://github.com/ckeditor/ckeditor-dev/issues/595): Fixed: Pasting does not work on mobile devices.
* [#869](https://github.com/ckeditor/ckeditor-dev/issues/869): Fixed: Empty selection clears cached clipboard data in the editor.
* [#1419](https://github.com/ckeditor/ckeditor-dev/issues/1419): Fixed: The [Widged Selection](https://ckeditor.com/cke4/addon/widgetselection) plugin selects the editor content with the <kbd>Alt+A</kbd> key combination on Windows.
* [#1274](https://github.com/ckeditor/ckeditor-dev/issues/1274): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not match a single selected image using the [`contextDefinition.cssSelector`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.plugins.balloontoolbar.contextDefinition-property-cssSelector) matcher.
* [#1232](https://github.com/ckeditor/ckeditor-dev/issues/1232): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) buttons should be registered as focusable elements.
* [#1342](https://github.com/ckeditor/ckeditor-dev/issues/1342): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) should be re-positioned after a [change](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.editor-event-change) event.
* [#1048](https://github.com/ckeditor/ckeditor-dev/issues/1048): Fixed: [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) is not properly positioned when margin added to its non-static parent.
* [#889](https://github.com/ckeditor/ckeditor-dev/issues/889): Fixed: Unclear error message for width and height fields in [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins.
* [#859](https://github.com/ckeditor/ckeditor-dev/issues/859): Fixed: Can't edit link after double click on text in link.
* [#1013](https://github.com/ckeditor/ckeditor-dev/issues/1013): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work correctly with [`config.forcePasteAsPlainText`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.config-cfg-forcePasteAsPlainText) property.
* [#1356](https://github.com/ckeditor/ckeditor-dev/issues/1356): Fixed: [Border parse function](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.tools.style.parse-method-border) should allow spaces in the color value.
* [#1426](https://github.com/ckeditor/ckeditor-dev/issues/1426): [IE8-9] Fixed: Missing balloon toolbar background in Kama skin. Thanks to [Christian Elmer](https://github.com/keinkurt)!
* [#1010](https://github.com/ckeditor/ckeditor-dev/issues/1010): Fixed: CSS `border` shorthand property was incorrectly expanded ignoring `border-color` style.
* [#1342](https://github.com/ckeditor/ckeditor-dev/issues/1342): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) should be re-positioned after the [`change`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.editor-event-change) event.
* [#1426](https://github.com/ckeditor/ckeditor-dev/issues/1426): [IE8-9] Fixed: Missing [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) background in the [Kama](https://ckeditor.com/cke4/addon/kama) skin. Thanks to [Christian Elmer](https://github.com/keinkurt)!
* [#1470](https://github.com/ckeditor/ckeditor-dev/issues/1470): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not visible after drag and drop of a widget it is attached to.
* [#1348](https://github.com/ckeditor/ckeditor-dev/issues/1348): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) aspect ratio locking uses old width and height on `src` change.
* [#1048](https://github.com/ckeditor/ckeditor-dev/issues/1048): Fixed: [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) is not positioned properly when a margin is added to its non-static parent.
* [#889](https://github.com/ckeditor/ckeditor-dev/issues/889): Fixed: Unclear error message for width and height fields in the [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins.
* [#859](https://github.com/ckeditor/ckeditor-dev/issues/859): Fixed: Cannot edit a link after a double-click on the text in the link.
* [#1013](https://github.com/ckeditor/ckeditor-dev/issues/1013): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work correctly with the [`config.forcePasteAsPlainText`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.config-cfg-forcePasteAsPlainText) option.
* [#1356](https://github.com/ckeditor/ckeditor-dev/issues/1356): Fixed: [Border parse function](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.tools.style.parse-method-border) does not allow spaces in the color value.
* [#1010](https://github.com/ckeditor/ckeditor-dev/issues/1010): Fixed: The CSS `border` shorthand property was incorrectly expanded ignoring the `border-color` style.
* [#1535](https://github.com/ckeditor/ckeditor-dev/issues/1535): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) mouseover border contrast is insufficient.
* [#1516](https://github.com/ckeditor/ckeditor-dev/issues/1516): Fixed: Fake selection allows removing content in read-only mode using the <kbd>Backspace</kbd> and <kbd>Delete</kbd> keys.
* [#1570](https://github.com/ckeditor/ckeditor-dev/issues/1570): Fixed: Fake selection allows cutting content in read-only mode using the <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>X</kbd> keys.
* [#1363](https://github.com/ckeditor/ckeditor-dev/issues/1363): Fixed: Paste notification is unclear and it might confuse users.
* [#1348](https://github.com/ckeditor/ckeditor-dev/issues/1348): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin aspect ratio locking uses old width and height on image URL change.

API Changes:

* [#1346](https://github.com/ckeditor/ckeditor-dev/issues/1346): [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) [context manager API](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.plugins.balloontoolbar.contextManager) is now available in [pluginDefinition.init](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.pluginDefinition-method-init) method of a [requiring](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.pluginDefinition-property-requires) plugin.
* [#1346](https://github.com/ckeditor/ckeditor-dev/issues/1346): [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) [context manager API](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.plugins.balloontoolbar.contextManager) is now available in the [`pluginDefinition.init`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.pluginDefinition-method-init) method of the [requiring](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.pluginDefinition-property-requires) plugin.
* [#1530](https://github.com/ckeditor/ckeditor-dev/issues/1530): Added the possibility to use custom icons for [buttons](CKEDITOR.ui.button).

Other Changes:

* Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugins:
* SCAYT [`scayt_minWordLength`](https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_config.html#scayt_minWordLength) configuration option now defaults to 3 instead of 4.
* SCAYT default number of suggested words in the context menu changed to 3.
* [#90](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/90): Fixed: Selection is lost on link creation if SCAYT highlights the word.
* Fixed: SCAYT crashes when the browser `localStorage` is disabled.
* [IE11] Fixed: `Unable to get property type of undefined or null reference` error in the browser console when SCAYT is disabled/enabled.
* [#46](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/46): Fixed: Editing is blocked when remote spell checker server is offline.
* Fixed: User Dictionary cannot be created in WSC due to `You already have the dictionary` error.
* Fixed: Words with apostrophe `'` on the replacement make the WSC dialog inaccessible.
* Fixed: SCAYT/WSC causes the `Uncaught TypeError` error in the browser console.
* [#1337](https://github.com/ckeditor/ckeditor-dev/issues/1337): Updated the samples layout with the new CKEditor 4 logo and color scheme.
* [#1591](https://github.com/ckeditor/ckeditor-dev/issues/1591): CKBuilder and language tools are now downloaded over HTTPS. Thanks to [August Detlefsen](https://github.com/augustd)!

## CKEditor 4.8

Expand Down
3 changes: 1 addition & 2 deletions contents.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ span[lang]
figure
{
text-align: center;
border: solid 1px #ccc;
border-radius: 2px;
outline: solid 1px #ccc;
background: rgba(0,0,0,0.05);
padding: 10px;
margin: 10px 20px;
Expand Down
9 changes: 5 additions & 4 deletions core/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1575,15 +1575,16 @@ CKEDITOR.ELEMENT_MODE_INLINE = 3;
/**
* Whether an editable element should have focus when the editor is loading for the first time.
*
* // Focus at the beginning of editable.
* // Focus at the beginning of the editable.
* config.startupFocus = true;
*
* Since CKEditor 4.9.0, `startupFocus` can be explicitly set as `String` :
* Since CKEditor 4.9.0, `startupFocus` can be explicitly set to either the `start` or the `end`
* of the editable:
*
* // Focus at the beginning of editable.
* // Focus at the beginning of the editable.
* config.startupFocus = 'start';
*
* // Focus at the end of editable.
* // Focus at the end of the editable.
* config.startupFocus = 'end';
*
* @cfg {String/Boolean} [startupFocus=false]
Expand Down
8 changes: 7 additions & 1 deletion core/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@
range = editor.createRange(),
found;

// We have to skip deletion for read only editor (#1516).
if ( editor.readOnly ) {
return;
}

// If haven't found place for caret on the default side,
// try to find it on the other side.
if ( !( found = range.moveToClosestEditablePosition( evt.selected, right ) ) )
Expand Down Expand Up @@ -1085,8 +1090,9 @@
}, null, null, 100 );

editor.on( 'key', function( evt ) {
if ( editor.mode != 'wysiwyg' )
if ( editor.mode != 'wysiwyg' ) {
return;
}

var sel = editor.getSelection();
if ( !sel.isFake )
Expand Down
100 changes: 98 additions & 2 deletions core/style.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
Expand Down Expand Up @@ -136,7 +136,7 @@ CKEDITOR.STYLE_OBJECT = 3;
*
* @class
* @constructor Creates a style class instance.
* @param styleDefinition
* @param {CKEDITOR.style.definition} styleDefinition
* @param variablesValues
*/
CKEDITOR.style = function( styleDefinition, variablesValues ) {
Expand Down Expand Up @@ -2117,3 +2117,99 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, {
* @cfg {String/Array/Boolean} [stylesSet='default']
* @member CKEDITOR.config
*/

/**
* Abstract class describing definition of a style.
*
* This virtual class illustrates the properties that developers can use to define and create
* style definitions.
*
* Style definition object represents a style as a set of properties defining element structure, its attributes and CSS styles.
* The {@link CKEDITOR.style} based on such definition can be applied to and removed from selection
* through various {@link CKEDITOR.style} methods.
*
* ```javascript
* {
* name: 'Special Title',
* element: 'h1',
* attributes: { class: 'my_class' },
* styles: { color: 'red', 'font-size': '16px', 'font-width': 'bold' }
* }
* ```
*
* More on how editor content styles are handled can be found in the [Styles guide](#!/guide/dev_howtos_styles).
*
* @class CKEDITOR.style.definition
* @abstract
*/

/**
* Defines style type.
*
* There are three standard style types - {@link CKEDITOR#STYLE_INLINE}, {@link CKEDITOR#STYLE_BLOCK}
* or {@link CKEDITOR#STYLE_OBJECT}, each one related to the element used in the style rule and types of
* elements to which specific style can be applied.
*
* Plugins may define {@link CKEDITOR.style.customHandlers special style handlers} to customize style operations.
* To use special style handler, `type` property should be set as a name of the style handler, e.g. `widget`.
*
* More on style types can be found in the [Style Types section of the Styles guide](#!/guide/dev_styles-section-style-types).
*
* ```javascript
* { type: CKEDITOR.STYLE_INLINE }
* ```
*
* @property {String/Number} type=CKEDITOR.STYLE_INLINE
*/

/**
* An unique style definition name. It could be used to differentiate definitions, like in [Styles Combo](#!/guide/dev_styles) plugin dropdown where it represents item labels.
*
* ```javascript
* { name: 'Special title' }
* ```
*
* @property {String} name
*/

/**
* A set of properties specifying attributes of the HTML style element.
* If `style` attribute is present it will be merged with existing {@link CKEDITOR.style.definition#styles} property.
*
* ```javascript
* {
* attributes: {
* style: 'color: red',
* class: 'link'
* }
* }
* ```
*
* @property {Object.<String, String>} attributes
*/

/**
* Element type which will be applied to selection when applying a style. It should be a valid HTML element, for example `span`.
*
* ```javascript
* { element: 'h1' }
* ```
*
* @property {String} element
*/

/**
* A set of properties specifying CSS style rules of the HTML style element.
*
* ```javascript
* {
* styles: {
* color: 'red',
* 'font-size': '12px'
* 'font-weight': 'bold'
* }
* }
* ```
*
* @property {Object.<String, String>} styles
*/
2 changes: 1 addition & 1 deletion dev/builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo "CKBuilder - Builds a release version of ckeditor-dev."
echo ""

CKBUILDER_VERSION="2.3.2"
CKBUILDER_URL="http://download.cksource.com/CKBuilder/$CKBUILDER_VERSION/ckbuilder.jar"
CKBUILDER_URL="https://download.cksource.com/CKBuilder/$CKBUILDER_VERSION/ckbuilder.jar"

PROGNAME=$(basename $0)
MSG_UPDATE_FAILED="Warning: The attempt to update ckbuilder.jar failed. The existing file will be used."
Expand Down
4 changes: 2 additions & 2 deletions dev/langtool/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Updates cklangtool. This script should not be executed separately, it is included in other scripts.

CKLANGTOOL_VERSION="1.2.2"
CKLANGTOOL_URL="http://download.cksource.com/CKLangTool/$CKLANGTOOL_VERSION/langtool.jar"
CKLANGTOOL_URL="https://download.cksource.com/CKLangTool/$CKLANGTOOL_VERSION/langtool.jar"

PROGNAME=$(basename $0)
MSG_UPDATE_FAILED="Warning: The attempt to update cklangtooljar failed. The existing file will be used."
Expand Down Expand Up @@ -46,5 +46,5 @@ fi
cd ../..


plugins=( about autoembed basicstyles bidi blockquote button clipboard codesnippet colorbutton colordialog contextmenu copyformatting devtools div docprops elementspath embedbase fakeobjects filetools find flash font format forms horizontalrule iframe image image2 indent justify language link list liststyle magicline maximize mathjax newpage notification pagebreak pastefromword pastetext placeholder preview print removeformat save selectall showblocks smiley sourcearea sourcedialog specialchar stylescombo table templates toolbar uicolor undo uploadwidget widget )
plugins=( about autoembed basicstyles bidi blockquote button clipboard codesnippet colorbutton colordialog contextmenu copyformatting devtools div docprops easyimage elementspath embedbase fakeobjects filetools find flash font format forms horizontalrule iframe image image2 imagebase indent justify language link list liststyle magicline maximize mathjax newpage notification pagebreak pastefromword pastetext placeholder preview print removeformat save selectall showblocks smiley sourcearea sourcedialog specialchar stylescombo table templates toolbar uicolor undo uploadwidget widget )
plugins_dialogs=( a11yhelp specialchar )
Loading

0 comments on commit a0431c3

Please sign in to comment.