From 22b493996c1c5bb4c6404b4f70d24c22c8563af1 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 26 May 2020 08:16:37 -0600 Subject: [PATCH] renamed markdown_editor to content_editor Signed-off-by: Andy Miller --- system/blueprints/user/account.yaml | 10 +++++----- system/src/Grav/Common/Flex/Types/Users/UserObject.php | 10 ++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/system/blueprints/user/account.yaml b/system/blueprints/user/account.yaml index 2569f658a..127a99e5b 100644 --- a/system/blueprints/user/account.yaml +++ b/system/blueprints/user/account.yaml @@ -67,14 +67,14 @@ form: default: 'en' help: PLUGIN_ADMIN.LANGUAGE_HELP - markdown_editor: + content_editor: type: select - label: PLUGIN_ADMIN.MARKDOWN_EDITOR + label: PLUGIN_ADMIN.CONTENT_EDITOR size: medium classes: fancy - data-options@: 'Grav\Plugin\Admin\Admin::markdownEditor' - default: 'codemirror' - help: PLUGIN_ADMIN.MARKDOWN_EDITOR_HELP + data-options@: 'Grav\Plugin\Admin\Admin::contentEditor' + default: 'default' + help: PLUGIN_ADMIN.CONTENT_EDITOR_HELP twofa_check: type: conditional diff --git a/system/src/Grav/Common/Flex/Types/Users/UserObject.php b/system/src/Grav/Common/Flex/Types/Users/UserObject.php index dfcadd046..077573c6f 100644 --- a/system/src/Grav/Common/Flex/Types/Users/UserObject.php +++ b/system/src/Grav/Common/Flex/Types/Users/UserObject.php @@ -135,6 +135,16 @@ class UserObject extends FlexObject implements UserInterface, MediaManipulationI } } + /** + * Helper to get content editor will fall back if not set + * + * @return String + */ + public function getContentEditor(): string + { + return $this->getProperty('content_editor', 'default'); + } + /** * Get value by using dot notation for nested arrays/objects. *