Page 1 of 1

How to capture the cursor location within a TIWCGJQMemoEx

PostPosted: 17 May 2016 21:01
by MCarver
CG Gurus,

I have a need to insert text into a TIWCGJQMemoEx at a particular location. How would I accomplish this task?

I am confident that
memoPlainText.Lines.Insert(AIndex, '{%TAG_NAME%}' );
will insert the text into the proper location.

The question is how do I capture the cursor location within the MemoEx when an Async event inserts the subject text? I was thinking of using the OnAsyncExit event, but what MemoEx property captures where the cursor is currently located?

Regards,
Monte Carver

Re: How to capture the cursor location within a TIWCGJQMemoE

PostPosted: 18 May 2016 17:35
by Alexander Bulei
Hi MCarver,

For what you need it?

You can change the text in server side and then call AjaxReRender, or in client side, but it require the javascript knowledge.

Best Regards.

Re: How to capture the cursor location within a TIWCGJQMemoE

PostPosted: 18 May 2016 18:39
by MCarver
Alexander,

From your response, it sound like you don't understand my question. So I will rephrase.

What properties in the CGMemoEx can I capture, that determines where the cursor is located within the CGMemoEx when a given Async event occurs? I am looking for something like Line.Offset, or Line.ItemIndex which allows me to determine where to insert a given tag.

Thank you for your support.

Regards,
Monte

Re: How to capture the cursor location within a TIWCGJQMemoE

PostPosted: 19 May 2016 09:11
by Alexander Bulei
Hi MCarver,

From your response, it sound like you don't understand my question. So I will rephrase.


I understand your question, just dont understand the reason...

Anyway, it can be done with javascript code, there is no properties for this purpose.

Best Regards.

Re: How to capture the cursor location within a TIWCGJQMemoE

PostPosted: 19 May 2016 16:15
by MCarver
Alex.

Thanks for your response.

The reason is to allow the user to insert tags having the form "{%TAG_NAME%}" into the given MemoEx, where the tag is inserted where the cursor was last placed. This behavior would mirror very much like the CGHtmlEditor. When one inserts a given property within the editor, it drops the property where the cursor is located. I am looking to mirror that ability somewhat by simply dropping a preformed tag into a MemoEx.

I was simply looking for an easy and painless solution to this task.

Regards,
Monte Carver

Re: How to capture the cursor location within a TIWCGJQMemoE

PostPosted: 19 May 2016 16:32
by Alexander Bulei
Hi MCarver,

As I said before:

it can be done with javascript code, there is no properties for this purpose.


This request is out of our standard support (special functionality), so you need the premium support ticket.
Send us your email (order) to check your the available tickets.

Best Regards.