Hi,
Again, this is not an XWiki related question, but a generic JavaScript (web
development actually) question on wich there are many articles, tutorials
and forum/stackoverflow answers.
As a quick reply, here's a small javascript that alerts the selected
message:
jQuery(document).on('mouseup', function (event) {
var selection = "";
if (window.getSelection) {
selection = window.getSelection().toString();
} else if (document.selection && document.selection.type != "Control")
{
selection = document.selection.createRange().text;
}
alert('Selected: ' + selection);
});
Got that from a quick Google search, which you could do as well if you
first spend a bit of time in understanding the basics of web development.
If you want to customize or develop from scratch (i.e. not using
AppWithinMinutes) XWiki applications, you really need to know at least the
basics on web development (HTML, JavaScript, CSS).
Hope this helps,
Eduard
P.S.: Don`t want to discourage you or anything, just hope to guide you in
the right direction :)
On Mon, Sep 14, 2015 at 3:52 PM, PATEL, ABDULKADAR <
abdulkadar.patel(a)capgemini.com> wrote:
Hi all,
Is there a way to handle text highlight event in xwiki?
In annotation component, when we highlight some text and then press ctrl+M,
Annotations popup is displayed.
How is this achieved?
I want to display a popup when user highlights some text on an xwiki page.
The popup will have a text box which will be pre-populated with the
highlighted text.
Please suggest me a proper approach to achieve this.
Thanks in advance.
Thanks & Regards,
____________________________________________________________________
[cid:image001.gif@01D0EF1A.556ADFC0]Abdulkadar Patel
Consultant | GESBU
Capgemini India | Pune
Tel.: +91 20 6631 1755 - Extn: 20 12530
Mob.: + 91 8087683419
Email: abdulkadar.patel(a)capgemini.com<mailtolto:
abdulkadar.patel(a)capgemini.com>
www.capgemini.com<http://www.capgemini.com/>
People matter, results count.
_______________________________________________________________________
7 Switch off as you go |q Recycle always | P Print only if absolutely
necessary
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs