Skip to content

Commit

Permalink
LPS-96737 aui-parse-content replaced by Metal globalEval
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrodw3 authored and brianchandotcom committed Jun 12, 2019
1 parent 9d2e39a commit 9756bba
Showing 1 changed file with 17 additions and 18 deletions.
@@ -1,4 +1,4 @@
import {closest} from 'metal-dom';
import {closest, globalEval} from 'metal-dom';
import Component from 'metal-component';
import {Config} from 'metal-state';
import {isFunction, isObject} from 'metal';
Expand Down Expand Up @@ -244,23 +244,22 @@ class FragmentEntryLinkContent extends Component {
*/
_renderContent(content) {
if (content && this.refs.content) {
AUI().use('aui-parse-content', A => {
const contentNode = A.one(this.refs.content);
contentNode.plug(A.Plugin.ParseContent);
contentNode.setContent(content);
if (this.editableValues) {
this._createEditables();

this._update({
defaultLanguageId: this.defaultLanguageId,
defaultSegmentsExperienceId: this
.defaultSegmentsExperienceId,
languageId: this.languageId,
segmentsExperienceId: this.segmentsExperienceId,
updateFunctions: []
});
}
});
this.refs.content.innerHTML = content;

globalEval.runScriptsInElement(this.refs.content);

if (this.editableValues) {
this._createEditables();

this._update({
defaultLanguageId: this.defaultLanguageId,
defaultSegmentsExperienceId: this
.defaultSegmentsExperienceId,
languageId: this.languageId,
segmentsExperienceId: this.segmentsExperienceId,
updateFunctions: []
});
}
}
}

Expand Down

0 comments on commit 9756bba

Please sign in to comment.