|
@@ -6,14 +6,15 @@ export default class RichText extends CustomElement {
|
|
|
|
|
|
static get properties () {
|
|
|
return {
|
|
|
- text: { type: String },
|
|
|
- offset: { type: Number },
|
|
|
mentions: { type: Array },
|
|
|
nick: { type: String },
|
|
|
+ offset: { type: Number },
|
|
|
+ onImgClick: { type: Function },
|
|
|
+ onImgLoad: { type: Function },
|
|
|
render_styling: { type: Boolean },
|
|
|
show_images: { type: Boolean },
|
|
|
- onImgClick: { type: Function },
|
|
|
- onImgLoad: { type: Function }
|
|
|
+ show_me_message: { type: Boolean },
|
|
|
+ text: { type: String },
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -23,15 +24,17 @@ export default class RichText extends CustomElement {
|
|
|
this.mentions = [];
|
|
|
this.render_styling = false;
|
|
|
this.show_images = false;
|
|
|
+ this.show_me_message = false;
|
|
|
}
|
|
|
|
|
|
render () {
|
|
|
const options = {
|
|
|
nick: this.nick,
|
|
|
- render_styling: this.render_styling,
|
|
|
- show_images: this.show_images,
|
|
|
onImgClick: this.onImgClick,
|
|
|
onImgLoad: this.onImgLoad,
|
|
|
+ render_styling: this.render_styling,
|
|
|
+ show_images: this.show_images,
|
|
|
+ show_me_message: this.show_me_message,
|
|
|
}
|
|
|
return renderRichText(this.text, this.offset, this.mentions, options);
|
|
|
}
|