109 lines
1.2 KiB
JavaScript
109 lines
1.2 KiB
JavaScript
|
|
import commentBody from '../comment.body.js';
|
|
|
|
import textarea from '/elements/textarea.js';
|
|
|
|
import document from '/unify/document.js';
|
|
|
|
import flexbox from '/elements/flexbox.js';
|
|
|
|
|
|
export default class commentEditBody extends commentBody, flexbox{
|
|
|
|
customElement = document.createElement("textarea");
|
|
|
|
useCustomElement = true;
|
|
|
|
width = "-webkit-fill-available"
|
|
|
|
padding = 20;
|
|
|
|
|
|
#ifdef MACOS
|
|
|
|
#ifdef LIGHT
|
|
|
|
background = "white";
|
|
|
|
color = "black";
|
|
|
|
borderRadius = 12;
|
|
|
|
margin = 6;
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef DARK
|
|
|
|
background = "#282828!important";
|
|
|
|
|
|
//color = "white";
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef WINDOWS
|
|
|
|
#ifdef LIGHT
|
|
|
|
background = "none";
|
|
|
|
color = "black";
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef DARK
|
|
|
|
background = "#202020cc";
|
|
|
|
borderRadius = 12;
|
|
|
|
#endif
|
|
|
|
margin = 16;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
async keyup( event ){
|
|
|
|
this.value = event.target.value;
|
|
|
|
var result = await this.socketManager.get( "column", "update", this, "keyup" );
|
|
|
|
}
|
|
|
|
|
|
create() {
|
|
|
|
this.deactivateTextarea()
|
|
|
|
}
|
|
|
|
activateTextarea() {
|
|
|
|
this.useCustomElement = true;
|
|
|
|
}
|
|
|
|
deactivateTextarea() {
|
|
|
|
this.useCustomElement = false;
|
|
|
|
|
|
}
|
|
|
|
useCustomElement = false;
|
|
|
|
fontSize = 14;
|
|
|
|
//color = "red";
|
|
|
|
} |