Skip to content

Commit bd388fe

Browse files
committed
PB-170: TinyMCE Performance is very poor with multiple instances on Stage
1 parent 4e641f3 commit bd388fe

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/utils/editor.js

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/stage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import "Magento_PageBuilder/js/resource/jquery/ui/jquery.ui.touch-punch";
1010
import _ from "underscore";
1111
import "./binding/sortable";
1212
import Collection from "./collection";
13-
import Config from "./config";
1413
import ContentTypeCollectionInterface from "./content-type-collection.types";
1514
import {ContentTypeRemovedParamsInterface} from "./content-type/content-type-events.types";
1615
import DataStore from "./data-store";

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/utils/editor.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
16
import $ from "jquery";
7+
import $t from "mage/translate";
28
import mageUtils from "mageUtils";
39
import {Editor} from "tinymce";
410
import Config from "../config";
@@ -83,7 +89,7 @@ function convertVariablesToHtmlPreview(content: string) {
8389
} else {
8490
// If we're unable to find the placeholder we need to attach an error class
8591
placeholder.addClass("magento-placeholder-error");
86-
placeholder.text((variableType === "custom" ? path : "Not Found"));
92+
placeholder.text((variableType === "custom" ? path : $t("Not Found")));
8793
}
8894

8995
return placeholder[0].outerHTML;

0 commit comments

Comments
 (0)