blob: 717aa8bf5106664d49e3ba8e5b2cce1e43aa71c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { FieldViewProps, FieldView } from "./FieldView";
import { computed } from "mobx";
import { observer } from "mobx-react";
import { KeyStore } from "../../../fields/KeyStore";
import React = require('react')
import { TextField } from "../../../fields/TextField";
import { HtmlField } from "../../../fields/HtmlField";
import { RichTextField } from "../../../fields/RichTextField";
@observer
export class WebView extends React.Component<FieldViewProps> {
public static LayoutString(fieldStr: string = "DataKey") { return FieldView.LayoutString(WebView, fieldStr) }
@computed
get html(): string {
return this.props.doc.GetData(KeyStore.Data, HtmlField, "" as string);
}
render() {
return <span dangerouslySetInnerHTML={{ __html: this.html }}></span>
}
}
|