Added placeholder support for Redactor
authorAlexander Ebert <ebert@woltlab.com>
Tue, 23 Aug 2016 18:50:39 +0000 (20:50 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 23 Aug 2016 18:50:48 +0000 (20:50 +0200)
com.woltlab.wcf/templates/wysiwyg.tpl
wcfsetup/install/files/style/ui/redactor.scss

index 2ecbda226cf1fbbf0658909a867870de6891ee70..c43230fdea977f55edddcdeadb7ca32aa3e99eaa 100644 (file)
                                                'remove-size': '{lang}wcf.editor.button.size.removeSize{/lang}',
 
                                                // color
-                                               'remove-color': '{lang}wcf.editor.button.color.removeColor{/lang}',
+                                               'remove-color': '{lang}wcf.editor.button.color.removeColor{/lang}'
                                        }
                                },
                                linkify: false,
                                linkSize: 0xBADC0DED, // some random value to disable truncating
                                minHeight: 200,
+                               placeholder: elData(element, 'placeholder') || '',
                                plugins: [
                                        // Imperavi
                                        'alignment',
index 43c8cfbd950c05639e75fbb3798356fcbf5ece5a..b0413b5186ba892733b89473e504dd8503953b99 100644 (file)
                min-width: auto;
        }
        
+       &.redactor-placeholder::after {
+               color: $wcfContentDimmedText;
+               content: attr(placeholder);
+               display: block;
+               position: absolute;
+       }
+       
        & + textarea {
                border-width: 0;
                box-shadow: none;