[28193] Make outer container of display field a div

https://community.openproject.com/wp/28193
pull/6525/head
Oliver Günther 6 years ago committed by Wieland Lindenthal
parent 4b130e72da
commit 3cdc21767e
  1. 11
      frontend/src/app/modules/fields/display/field-types/wp-display-formattable-field.module.ts

@ -36,16 +36,15 @@ export class FormattableDisplayField extends DisplayField {
private readonly appRef = this.$injector.get(ApplicationRef);
public render(element:HTMLElement, displayText:string):void {
element.classList.add('read-value--html', 'wiki', 'highlight', '-multiline');
let span = document.createElement('span');
span.innerHTML = displayText;
let div = document.createElement('div');
div.classList.add('read-value--html', 'wiki', 'highlight', '-multiline');
div.innerHTML = displayText;
element.innerHTML = '';
element.appendChild(span);
element.appendChild(div);
// Allow embeddable rendered content
DynamicBootstrapper.bootstrapOptionalEmbeddable(this.appRef, span);
DynamicBootstrapper.bootstrapOptionalEmbeddable(this.appRef, div);
}
public get isFormattable():boolean {

Loading…
Cancel
Save