How can I achieve The requirement to achieve the link previews the way it is in facebook timeline in messaging in Openerp-7 I have Changed the editor to show the video link:
instance.mail.ThreadComposeMessage.include({
template: 'mail.thread.message.aims',
start: function() {
this._super.apply(this, arguments);
},
reinit: function() {
var self= this;
this._super.apply(this, arguments);
this.$textarea = this.$el.find('textarea');
var width = '100%';
var height = 250;
this._updating_editor = false;
if (this.$textarea.length) {
this.$textarea.cleditor({
width: width, // width not including margins, borders or padding
height: height, // height not including margins, borders or padding
controls: // controls to add to the toolbar
"bold italic underline strikethrough " +
"| removeformat | bullets numbering | outdent " +
"indent | link unlink | source",
bodyStyle: // style to assign to document body contained within the editor
"margin:4px; color:#4c4c4c; font-size:13px; font-family:'Lucida Grande',Helvetica,Verdana,Arial,sans-serif; cursor:text"
});
this.$cleditor = this.$textarea.cleditor()[0];
this.$cleditor.change(function() {
if (! self._updating_editor) {
self.$cleditor.updateTextArea();
}
});
}
},
Using the "Show Source" option I can show the video on the Document created, but It is not coming to the Below Chatter It is only Showing the Text. But I want it to show me the preview before it post to the below chatter Like it is in facebook