You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Simon B <si...@gmail.com> on 2016/03/17 14:03:46 UTC

AjaxEditableMultiLineLabel place cursor on click location

Hi, 

First of all thank you to everyone for such a great framework!

My question is that when I use the AjaxEditableMultiLineLabel and click on
the displayed text the subsequent text in the textarea form element is *all*
selected, this makes it difficult to then find the place that I wanted to
edit.

Has anyone found a way to place the cursor at the location which was clicked
on in the original text and scroll the textarea to that location.

This would increase the utility of the AjaxEditableMultiLineLabel massively,

Any replies very appreciated



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxEditableMultiLineLabel-place-cursor-on-click-location-tp4674053.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxEditableMultiLineLabel place cursor on click location

Posted by Simon B <si...@gmail.com>.
Thanks for the quick reply, I'll have a go with that!

Cheers
Simon

On 17 March 2016 at 14:39, Martin Grigorov-4 [via Apache Wicket]
<ml...@n4.nabble.com> wrote:
> Hi,
>
> This requirement sounds quite sophisticated!
> Initially AEMLL is rendered in view mode - as a Label, i.e. a <span>.
> When you click on this <span> then an Ajax call is made and the Label is
> replaced with TextArea.
> It would be challenging to set the cursor at the desired position.
>
> Maybe it will be much simpler to use something like Summernote air mode
> [1][2].
> It uses <div contenteditable="true"> and all this "Just Works".
>
> 1. http://wb-mgrigorov.rhcloud.com/summernote
> 2. http://summernote.org/examples/#air-mode
>


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxEditableMultiLineLabel-place-cursor-on-click-location-tp4674053p4674055.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxEditableMultiLineLabel place cursor on click location

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

This requirement sounds quite sophisticated!
Initially AEMLL is rendered in view mode - as a Label, i.e. a <span>.
When you click on this <span> then an Ajax call is made and the Label is
replaced with TextArea.
It would be challenging to set the cursor at the desired position.

Maybe it will be much simpler to use something like Summernote air mode
[1][2].
It uses <div contenteditable="true"> and all this "Just Works".

1. http://wb-mgrigorov.rhcloud.com/summernote
2. http://summernote.org/examples/#air-mode

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Mar 17, 2016 at 2:03 PM, Simon B <si...@gmail.com> wrote:

> Hi,
>
> First of all thank you to everyone for such a great framework!
>
> My question is that when I use the AjaxEditableMultiLineLabel and click on
> the displayed text the subsequent text in the textarea form element is
> *all*
> selected, this makes it difficult to then find the place that I wanted to
> edit.
>
> Has anyone found a way to place the cursor at the location which was
> clicked
> on in the original text and scroll the textarea to that location.
>
> This would increase the utility of the AjaxEditableMultiLineLabel
> massively,
>
> Any replies very appreciated
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxEditableMultiLineLabel-place-cursor-on-click-location-tp4674053.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>