diff --git a/build/changelog/entries/2018/02/12309.GTXPE-165.enhancement b/build/changelog/entries/2018/02/12309.GTXPE-165.enhancement
new file mode 100644
index 0000000000..efb7ec628b
--- /dev/null
+++ b/build/changelog/entries/2018/02/12309.GTXPE-165.enhancement
@@ -0,0 +1 @@
+The focal point button icon for the image plugin has been updated.
diff --git a/build/changelog/entries/2018/02/12311.SUP-5908.bugfix b/build/changelog/entries/2018/02/12311.SUP-5908.bugfix
new file mode 100644
index 0000000000..148e1c95b8
--- /dev/null
+++ b/build/changelog/entries/2018/02/12311.SUP-5908.bugfix
@@ -0,0 +1,3 @@
+paste-plugin: When a list was pasted from Word, where items started a new list beginning at a level greater than 1, the list item was removed, because Aloha Editor
+does not allow lists that start at a nesting level greater than 1.
+The behaviour has been changed now, so that such lists will be pasted, so that the first item starts at level 1.
diff --git a/build/changelog/entries/2018/02/12312.SUP-5908.bugfix b/build/changelog/entries/2018/02/12312.SUP-5908.bugfix
new file mode 100644
index 0000000000..02d914efeb
--- /dev/null
+++ b/build/changelog/entries/2018/02/12312.SUP-5908.bugfix
@@ -0,0 +1,2 @@
+list-plugin: The list plugin allowed to insert paragraphs or headers into list items, which caused unexpected editing behaviour.
+This is now changed, so it is no longer possible to insert paragraphs or headers into list items.
diff --git a/build/changelog/entries/2018/03/12326.SUP-5832.bugfix b/build/changelog/entries/2018/03/12326.SUP-5832.bugfix
new file mode 100644
index 0000000000..774557ac31
--- /dev/null
+++ b/build/changelog/entries/2018/03/12326.SUP-5832.bugfix
@@ -0,0 +1,4 @@
+When a row of a table was transformed into a header, and afterwards all rows were deleted,
+the table itself was not deleted. This has been fixed now.
+Also, after the selected rows/columns were deleted, the floating menu still showed table related tabs, which was
+incorrect, because the table was not selected any more.
diff --git a/build/changelog/entries/2018/03/12349.SUP-6082.bugfix b/build/changelog/entries/2018/03/12349.SUP-6082.bugfix
new file mode 100644
index 0000000000..f015066d2c
--- /dev/null
+++ b/build/changelog/entries/2018/03/12349.SUP-6082.bugfix
@@ -0,0 +1 @@
+wordcontenthandler: Removed alignment when pasting aligned text from Word.
\ No newline at end of file
diff --git a/build/changelog/entries/2018/03/6133.SUP-5481.bugfix b/build/changelog/entries/2018/03/6133.SUP-5481.bugfix
new file mode 100644
index 0000000000..56bf7a62b6
--- /dev/null
+++ b/build/changelog/entries/2018/03/6133.SUP-5481.bugfix
@@ -0,0 +1 @@
+In certain cases whitespace could not be deleted with the delete or backspace keys. This has been fixed.
diff --git a/build/changelog/mappings/1.4.44.json b/build/changelog/mappings/1.4.44.json
new file mode 100644
index 0000000000..18e6fe7a90
--- /dev/null
+++ b/build/changelog/mappings/1.4.44.json
@@ -0,0 +1,12 @@
+{
+ "version": "1.4.44",
+ "date": "28.02.2018",
+ "changeLogEntryFileNames": [
+ "12275.GTXPE-123.feature",
+ "12312.SUP-5908.bugfix",
+ "12311.SUP-5908.bugfix",
+ "12309.GTXPE-165.enhancement",
+ "12269.GTXPE-123.feature"
+ ],
+ "genericProperties": {}
+}
\ No newline at end of file
diff --git a/build/changelog/mappings/1.4.45.json b/build/changelog/mappings/1.4.45.json
new file mode 100644
index 0000000000..7418138d34
--- /dev/null
+++ b/build/changelog/mappings/1.4.45.json
@@ -0,0 +1,9 @@
+{
+ "version": "1.4.45",
+ "date": "21.03.2018",
+ "changeLogEntryFileNames": [
+ "6133.SUP-5481.bugfix",
+ "12326.SUP-5832.bugfix"
+ ],
+ "genericProperties": {}
+}
\ No newline at end of file
diff --git a/build/changelog/mappings/1.4.46.json b/build/changelog/mappings/1.4.46.json
new file mode 100644
index 0000000000..75f7ef594f
--- /dev/null
+++ b/build/changelog/mappings/1.4.46.json
@@ -0,0 +1,8 @@
+{
+ "version": "1.4.46",
+ "date": "02.05.2018",
+ "changeLogEntryFileNames": [
+ "12349.SUP-6082.bugfix"
+ ],
+ "genericProperties": {}
+}
\ No newline at end of file
diff --git a/doc/guides/source/plugin_contenthandler.textile b/doc/guides/source/plugin_contenthandler.textile
index 47df55b6ea..d78d5a6fc4 100644
--- a/doc/guides/source/plugin_contenthandler.textile
+++ b/doc/guides/source/plugin_contenthandler.textile
@@ -136,6 +136,11 @@ The Word Content Handler will detect content pasted from Microsoft Word 2003 and
* keep bold and italic formatting, headlines, tables and lists but get rid of all other formattings
* Remove links to local files (with file :// URLs), but it preserves the link contents
+WARNING: Word supports much more formatting options than Aloha Editor. Therefore the content pasted from Word into Aloha Editor will be different, if its formatting or
+structure in Word is not supported by Aloha Editor.
+Additionally, the HTML produced by Word when doing Copy & Paste is generally of poor quality (or even invalid) and different depending on the used browser version. Therefore,
+the resulting content can also be different across browsers and may not reflect the formatting or structure of the original content in Word.
+
h4. Generic Content Handler
The Generic Content Handler is a bit less generic than his name might suggest as he will apply the following cleaning actions:
diff --git a/doc/guides/source/plugin_list.textile b/doc/guides/source/plugin_list.textile
index 923ed76c7d..cee30d7fc6 100644
--- a/doc/guides/source/plugin_list.textile
+++ b/doc/guides/source/plugin_list.textile
@@ -17,6 +17,8 @@ You can use the tab key to indent unordered and ordered lists or use shift-tab t
You can remove lists by clicking the applied list type a second time, which will turn individual list items back into paragraphs.
+NOTE: Although allowed by the HTML specification, Aloha Editor will not allow nesting of paragraphs or headers in list items.
+
h4. List styles
If you open the dropdown next to the respective list icon, you can choose from a list of pre-defined list styles.
diff --git a/doc/guides/source/plugin_paste.textile b/doc/guides/source/plugin_paste.textile
index 6e31c8738b..b34bfc4d00 100644
--- a/doc/guides/source/plugin_paste.textile
+++ b/doc/guides/source/plugin_paste.textile
@@ -4,11 +4,14 @@ The Paste plugin enables copy and paste action for Aloha Editor editables.
endprologue.
-The Paste plugin is used to handle the paste action in an editable. "ContentHanlder":plugin_contenthandler.html can be used to configure how pasted content will be handled.
+The Paste plugin is used to handle the paste action in an editable. "ContentHandler":plugin_contenthandler.html can be used to configure how pasted content will be handled.
* The source of a pasted Microsoft Word(tm) document will be cleaned up
* URLs to media content can be embeded after the paste action using the oEmbed contentHandler
+WARNING: Copy & Paste is generally handled by the browser itself. The paste plugin can only handle the content, which is provided by the browser. This means that copy & paste might
+produce different results depending on the used browser.
+
h3. Configuration
Enable the paste plugin +common/paste+.
diff --git a/pom.xml b/pom.xml
index 13fa947295..f513509844 100755
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.alohaeditor
alohaeditor
- 1.4.44-SNAPSHOT
+ 1.4.47-SNAPSHOT
jar
Aloha Editor
http://aloha-editor.org
diff --git a/src/lib/aloha/engine.js b/src/lib/aloha/engine.js
index f72ecdd303..823722b92d 100644
--- a/src/lib/aloha/engine.js
+++ b/src/lib/aloha/engine.js
@@ -1333,7 +1333,7 @@ define([
reference = previousNode(reference);
// "If reference is a block node or a br, return true."
- if (isBlockNode(reference) || isNamedHtmlElement(reference, 'br')) {
+ if (reference != ancestor && (isBlockNode(reference) || isNamedHtmlElement(reference, 'br'))) {
return true;
}
diff --git a/src/lib/aloha/selection.js b/src/lib/aloha/selection.js
index fc36ab4613..5e4356cd19 100644
--- a/src/lib/aloha/selection.js
+++ b/src/lib/aloha/selection.js
@@ -418,13 +418,6 @@ define([
'img': true,
'ul': true,
'ol': true,
- 'h1': true,
- 'h2': true,
- 'h3': true,
- 'h4': true,
- 'h5': true,
- 'h6': true,
- 'p': true,
'del': true,
'ins': true,
'u': true,
diff --git a/src/plugins/common/contenthandler/lib/genericcontenthandler.js b/src/plugins/common/contenthandler/lib/genericcontenthandler.js
index 10d4bf7075..96a00f4406 100755
--- a/src/plugins/common/contenthandler/lib/genericcontenthandler.js
+++ b/src/plugins/common/contenthandler/lib/genericcontenthandler.js
@@ -196,16 +196,16 @@ define([
cleanLists: function ($content) {
$content.find('ul,ol').filter(notAlohaBlockFilter).find('>:not(li)').remove();
- // Remove paragraphs inside list elements, if they are
- // the only child. e.g.: li > p > text
+ // Remove paragraphs and headers inside list elements
// This has been observed to happen with Word documents
- $content.find("li").filter(notAlohaBlockFilter).each(function() {
- var $li = $(this);
- var $children = $li.children();
- if ($children.length === 1 && $children.is("p")) {
- $children.contents().appendTo($li);
- $children.remove();
+ $content.find("li").filter(notAlohaBlockFilter).find('p,h1,h2,h3,h4,h5,h6').each(function() {
+ var $elem = $(this);
+ // when the paragraph has a sibling and it's content does not have a
as last child, we append a
+ // in order to preserve the line break
+ if (!$elem.is(':last-child') && !$elem.contents().last().is('br')) {
+ $elem.append('
');
}
+ $elem.contents().unwrap();
});
},
diff --git a/src/plugins/common/contenthandler/lib/wordcontenthandler.js b/src/plugins/common/contenthandler/lib/wordcontenthandler.js
index 484be90623..423fc38d4f 100755
--- a/src/plugins/common/contenthandler/lib/wordcontenthandler.js
+++ b/src/plugins/common/contenthandler/lib/wordcontenthandler.js
@@ -215,6 +215,8 @@ define([
if (prev.length > 0) {
prev.append($node)
+ } else {
+ $node.contents().unwrap();
}
}
if (isEmpty($node)) {
@@ -228,6 +230,8 @@ define([
} else if (nodeName === 'a'
&& $node.attr('href') && $node.attr('href').match("^file://")) {
$node.contents().unwrap();
+ } else if (nodeName === 'p' && $node.attr('align')) {
+ $node.removeAttr('align');
}
}
diff --git a/src/plugins/common/image/css/image.css b/src/plugins/common/image/css/image.css
index f9fe754440..e57d534737 100755
--- a/src/plugins/common/image/css/image.css
+++ b/src/plugins/common/image/css/image.css
@@ -41,7 +41,7 @@
}
.aloha-img.aloha-image-set-focalpoint {
- background: url(../img/set-focalpoint.gif);
+ background: url(../img/set-focalpoint.png);
}
.aloha-default-file-icon {
diff --git a/src/plugins/common/image/img/set-focalpoint.gif b/src/plugins/common/image/img/set-focalpoint.gif
deleted file mode 100644
index 8ac9acf1e0..0000000000
Binary files a/src/plugins/common/image/img/set-focalpoint.gif and /dev/null differ
diff --git a/src/plugins/common/image/img/set-focalpoint.png b/src/plugins/common/image/img/set-focalpoint.png
new file mode 100644
index 0000000000..fd0f68afd9
Binary files /dev/null and b/src/plugins/common/image/img/set-focalpoint.png differ
diff --git a/src/plugins/common/image/lib/image-floatingMenu.js b/src/plugins/common/image/lib/image-floatingMenu.js
index d9fffd05c6..a263e1e6a0 100644
--- a/src/plugins/common/image/lib/image-floatingMenu.js
+++ b/src/plugins/common/image/lib/image-floatingMenu.js
@@ -276,7 +276,7 @@ function (
Scopes.createScope('Aloha.img', ['Aloha.global']);
this._imageFocalPointButton = Ui.adopt("imageFocalPointButton", ToggleButton, {
- tooltip: i18n.t('FocalPoint'),
+ tooltip: i18n.t('focalpoint'),
icon: 'aloha-img aloha-image-set-focalpoint',
scope: plugin.name,
click: function () {
diff --git a/src/plugins/common/image/nls/de/i18n.js b/src/plugins/common/image/nls/de/i18n.js
index 2aea0a53f2..a2ed7a1bd1 100644
--- a/src/plugins/common/image/nls/de/i18n.js
+++ b/src/plugins/common/image/nls/de/i18n.js
@@ -21,6 +21,7 @@ define({
"size.decrease ": "Bild verkleinern",
"Resize": "Größe anpassen",
"Crop": "Zuschneiden",
+ "focalpoint": "Fokus Punkt setzen",
"Reset": "Zurücksetzen",
"Accept": "Bestätigen",
"Cancel": "Abbrechen",
diff --git a/src/plugins/common/image/nls/i18n.js b/src/plugins/common/image/nls/i18n.js
index 083343e8e8..0367a65f4e 100644
--- a/src/plugins/common/image/nls/i18n.js
+++ b/src/plugins/common/image/nls/i18n.js
@@ -22,6 +22,7 @@ define({
"size.decrease ": "Decrease Size",
"Resize": "Resize",
"Crop": "Crop",
+ "focalpoint": "Set focal point",
"Reset": "Reset",
"Accept": "Accept",
"Cancel": "Cancel",
diff --git a/src/plugins/common/table/lib/table-plugin.js b/src/plugins/common/table/lib/table-plugin.js
index ae8b329da0..57dca6580c 100755
--- a/src/plugins/common/table/lib/table-plugin.js
+++ b/src/plugins/common/table/lib/table-plugin.js
@@ -1641,6 +1641,7 @@ define([
} else {
// leave all scopes
TablePlugin.leaveTableScopes();
+ Scopes.setScope('Aloha.continuoustext');
}
};
diff --git a/src/plugins/common/table/lib/table-selection.js b/src/plugins/common/table/lib/table-selection.js
index 9d7f8939dc..680fd7c2f3 100644
--- a/src/plugins/common/table/lib/table-selection.js
+++ b/src/plugins/common/table/lib/table-selection.js
@@ -238,14 +238,7 @@ define([
this.selectedColumnIdxs = [];
this.selectedRowIdxs = [];
this.currentRectangle = {};
-
- //we keep 'cell' as the default selection type instead of
- //unsetting the selectionType to avoid an edge-case where a
- //click into a cell doesn't trigger a call to
- //TableCell.editableFocs (which would set the 'cell'
- //selection type) which would result in the FloatingMenu
- //losing the table scope.
- this.selectionType = 'cell';
+ this.selectionType = undefined;
this._notifyCellsUnselected();
}
diff --git a/src/plugins/common/table/lib/table.js b/src/plugins/common/table/lib/table.js
index 298e35fc10..5165bbea97 100644
--- a/src/plugins/common/table/lib/table.js
+++ b/src/plugins/common/table/lib/table.js
@@ -247,7 +247,7 @@ define([
// find the dimensions of the table
this.numCols = this.countVirtualCols();
- var rows = this.getRows();
+ var rows = this.getRows(true);
this.numRows = rows.length;
// init the cell-attribute with an empty array
@@ -2225,13 +2225,20 @@ define([
};
/**
+ * @param {Boolean} filterSelectionRow filter selection row
* @return the rows of the table as an array of DOM nodes
*/
- Table.prototype.getRows = function () {
+ Table.prototype.getRows = function (filterSelectionRow) {
//W3C DOM property .rows supported by all modern browsers
var rows = this.obj.get( 0 ).rows;
//converts the HTMLCollection to a real array
- return jQuery.makeArray( rows );
+ rows = jQuery.makeArray(rows);
+ if (filterSelectionRow) {
+ rows = rows.filter(function(elt, i, array) {
+ return !jQuery(elt).hasClass('aloha-ephemera');
+ });
+ }
+ return rows;
};
return Table;
diff --git a/src/test/unit/delete.html b/src/test/unit/delete.html
index 186e986bf8..205be2bc54 100644
--- a/src/test/unit/delete.html
+++ b/src/test/unit/delete.html
@@ -23,9 +23,10 @@
+