From af098b36129d979c08471bad95256083cae1382b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 23 Aug 2016 20:50:39 +0200 Subject: [PATCH] Added placeholder support for Redactor --- com.woltlab.wcf/templates/wysiwyg.tpl | 3 ++- wcfsetup/install/files/style/ui/redactor.scss | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index 2ecbda226c..c43230fdea 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -140,12 +140,13 @@ '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', diff --git a/wcfsetup/install/files/style/ui/redactor.scss b/wcfsetup/install/files/style/ui/redactor.scss index 43c8cfbd95..b0413b5186 100644 --- a/wcfsetup/install/files/style/ui/redactor.scss +++ b/wcfsetup/install/files/style/ui/redactor.scss @@ -73,6 +73,13 @@ min-width: auto; } + &.redactor-placeholder::after { + color: $wcfContentDimmedText; + content: attr(placeholder); + display: block; + position: absolute; + } + & + textarea { border-width: 0; box-shadow: none; -- 2.20.1