Fixed bug #13301: htmlArea RTE: textstyle cannot be applied to full content of block...
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 9 Jun 2010 01:02:42 +0000 (01:02 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 9 Jun 2010 01:02:42 +0000 (01:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7842 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js

index 735b79d..cd69fdf 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
        * Updated htmlArea RTE manual.
        * Fixed bug #14662: htmlArea RTE: Should use t3lib_utility_Client::getBrowserInfo
        * Fixed bug #13062: htmlArea RTE: "non-floating" float value doesn't stick on images
+       * Fixed bug #13301: htmlArea RTE: textstyle cannot be applied to full content of block element
 
 2010-06-08  Oliver Hader  <oliver@typo3.org>
 
index fb70861..2e02b4e 100644 (file)
@@ -3,6 +3,7 @@
        * Updated htmlArea RTE manual.
        * Fixed bug #14662: htmlArea RTE: Should use t3lib_utility_Client::getBrowserInfo
        * Fixed bug #13062: htmlArea RTE: "non-floating" float value doesn't stick on images
+       * Fixed bug #13301: htmlArea RTE: textstyle cannot be applied to full content of block element
 
 2010-06-06  Stanislas Rolland  <typo3@sjbr.ca>
 
index 0972c06..c3fa94d 100644 (file)
@@ -191,8 +191,8 @@ HTMLArea.TextStyle = HTMLArea.Plugin.extend({
                                parent = statusBarSelection;
                        }
                }
-               if (!selectionEmpty && !fullNodeSelected) {
-                               // The selection is not empty, nor full element
+               if (!selectionEmpty && !fullNodeSelected || (!selectionEmpty && fullNodeSelected && parent && HTMLArea.isBlockElement(parent))) {
+                               // The selection is not empty, nor full element, or the selection is full block element
                        if (className !== "none") {
                                        // Add span element with class attribute
                                var newElement = editor._doc.createElement("span");