From 372fcdb2eb90d068529176db3368964b8cef619e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 20 May 2017 15:46:06 +0200 Subject: [PATCH] Fixed metacode handling when discarding autosave content --- .../files/js/WoltLabSuite/Core/Ui/Redactor/Autosave.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Autosave.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Autosave.js index d0cd857362..b9ee16553c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Autosave.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Autosave.js @@ -7,7 +7,7 @@ * @license GNU Lesser General Public License * @module WoltLabSuite/Core/Ui/Redactor/Autosave */ -define(['Language', 'Dom/Traverse'], function(Language, DomTraverse) { +define(['Language', 'Dom/Traverse', './Metacode'], function(Language, DomTraverse, UiRedactorMetacode) { "use strict"; // time between save requests in seconds @@ -169,7 +169,8 @@ define(['Language', 'Dom/Traverse'], function(Language, DomTraverse) { this.clear(); // set code - this._editor.code.start(this._originalMessage); + var content = UiRedactorMetacode.convertFromHtml(this._editor.core.element()[0].id, this._originalMessage); + this._editor.code.start(content); // set value this._editor.core.textarea().val(this._editor.clean.onSync(this._editor.$editor.html())); -- 2.20.1