ckeditor / ckeditor4-angular

Official CKEditor 4 Angular component.
Other
55 stars 32 forks source link

Getting cursor position in ckeditor4-angular #63

Closed Chinna2405 closed 4 years ago

Chinna2405 commented 4 years ago

Are you reporting a feature request or a bug?

Provide detailed reproduction steps (if any)

  1. I tried to get the cursor Position my editor but i couldn't do that?
  2. Get error when using getSelection() methos

Expected result

What is the expected result of the above steps?

Actual result

What is the actual result of the above steps?

Other details

Dumluregn commented 4 years ago

Hi, from the information you provided it's hard to understand your problem. Please give us more details and preferably a sample where we could reproduce the issue (for reference see #54).

Chinna2405 commented 4 years ago

Okay. I will explain below about my issue.

In my issue, I am trying to add some elements from the list outside the editor by clicking it. But when I typed my whole content in the editor and I chose a place where to insert the element which i am going to click is getting added in the next of whole content but i need to get that element in my cursor position where i have clicked the cursor.

I have tried but couldn't able to get the cursor position.

Please help me to fix the issue.

Thanks in Advance.

Dumluregn commented 4 years ago

Thanks for giving more context, I'm starting to understand your issue, but still need something more, like at least screen or CodePen example. Also I wonder if this is anyhow connected to Angular? Because it seems irrelevant 🤔

Chinna2405 commented 4 years ago

I have found a way to insert the selected text in the editor.

this.editor.instance.insertText('selected text');

Thanks for spending your valuable time in this issue.