From: Alexander Ebert Date: Tue, 30 Aug 2016 11:21:00 +0000 (+0200) Subject: Adjust default content of empty editor for iOS X-Git-Tag: 3.0.0_Beta_1~404 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c6c30725b844a1c3bfda2fbb10b9ad05e264abef;p=GitHub%2FWoltLab%2FWCF.git Adjust default content of empty editor for iOS --- diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index b4a15e2d09..b8a52b2ad4 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -46,7 +46,7 @@ {event name='redactorJavaScript'} ], function () { - require(['Language', 'WoltLabSuite/Core/Ui/Redactor/Autosave', 'WoltLabSuite/Core/Ui/Redactor/Metacode'], function(Language, UiRedactorAutosave, UiRedactorMetacode) { + require(['Environment', 'Language', 'WoltLabSuite/Core/Ui/Redactor/Autosave', 'WoltLabSuite/Core/Ui/Redactor/Metacode'], function(Environment, Language, UiRedactorAutosave, UiRedactorMetacode) { Language.addObject({ 'wcf.editor.code.edit': '{lang}wcf.editor.code.edit{/lang}', 'wcf.editor.code.file': '{lang}wcf.editor.code.file{/lang}', @@ -223,6 +223,10 @@ config.callbacks.init = function() { // slight delay to allow Redactor to initialize itself window.setTimeout(function() { + if (content === '' && Environment.platform() === 'ios') { + content = '


'; + } + $(element).redactor('code.set', content); }, 10); }; diff --git a/wcfsetup/install/files/acp/templates/wysiwyg.tpl b/wcfsetup/install/files/acp/templates/wysiwyg.tpl index b4a15e2d09..b8a52b2ad4 100644 --- a/wcfsetup/install/files/acp/templates/wysiwyg.tpl +++ b/wcfsetup/install/files/acp/templates/wysiwyg.tpl @@ -46,7 +46,7 @@ {event name='redactorJavaScript'} ], function () { - require(['Language', 'WoltLabSuite/Core/Ui/Redactor/Autosave', 'WoltLabSuite/Core/Ui/Redactor/Metacode'], function(Language, UiRedactorAutosave, UiRedactorMetacode) { + require(['Environment', 'Language', 'WoltLabSuite/Core/Ui/Redactor/Autosave', 'WoltLabSuite/Core/Ui/Redactor/Metacode'], function(Environment, Language, UiRedactorAutosave, UiRedactorMetacode) { Language.addObject({ 'wcf.editor.code.edit': '{lang}wcf.editor.code.edit{/lang}', 'wcf.editor.code.file': '{lang}wcf.editor.code.file{/lang}', @@ -223,6 +223,10 @@ config.callbacks.init = function() { // slight delay to allow Redactor to initialize itself window.setTimeout(function() { + if (content === '' && Environment.platform() === 'ios') { + content = '


'; + } + $(element).redactor('code.set', content); }, 10); };