1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-26 18:58:21 +02:00

Clipper: Disabled preview for now as too many problems with it and not so useful

This commit is contained in:
Laurent Cozic 2019-07-14 09:46:06 +01:00
parent bdb31f2890
commit 3e48992eb4
2 changed files with 16 additions and 6 deletions

View File

@ -1,6 +1,6 @@
.App {
width: 400px;
height: 600px;
overflow-x: hidden;
overflow-y: hidden;
display: flex;

View File

@ -16,6 +16,8 @@ class PreviewComponent extends React.PureComponent {
}
componentDidMount() {
if (!this.bodyRef.current) return;
// Because the text size is made twice smaller with CSS, we need
// to also reduce the size of the images
const imgs = this.bodyRef.current.getElementsByTagName('img');
@ -28,14 +30,22 @@ class PreviewComponent extends React.PureComponent {
render() {
return (
<div className="Preview">
<a className={"Confirm Button"} onClick={this.props.onConfirmClick}>Confirm</a>
<h2>Preview:</h2>
<h2>Title:</h2>
<input className={"Title"} value={this.props.title} onChange={this.props.onTitleChange}/>
<div className={"BodyWrapper"}>
<div className={"Body"} ref={this.bodyRef} dangerouslySetInnerHTML={{__html: this.props.body_html}}></div>
</div>
<a className={"Confirm Button"} onClick={this.props.onConfirmClick}>Confirm</a>
</div>
);
// return (
// <div className="Preview">
// <a className={"Confirm Button"} onClick={this.props.onConfirmClick}>Confirm</a>
// <h2>Preview:</h2>
// <input className={"Title"} value={this.props.title} onChange={this.props.onTitleChange}/>
// <div className={"BodyWrapper"}>
// <div className={"Body"} ref={this.bodyRef} dangerouslySetInnerHTML={{__html: this.props.body_html}}></div>
// </div>
// </div>
// );
}
}