Oct 15, 2009, 9:18 AM
[CLOSED] Add Text to the current cursor-position in a textarea or htmleditor
Hello,
is there a way to add text to the current cursor-position of a textarea or htmleditor or whatever...?
E.g. i have the following code:
Is there a way to get the current (or last) cursor-position of the HtmlEditor and add the link or any other string there?
Regards,
Martin
is there a way to add text to the current cursor-position of a textarea or htmleditor or whatever...?
E.g. i have the following code:
<ext:ToolbarButton ID="AddLinkButton" runat="server" StandOut="true" Icon="LinkAdd"
Text="Link hinzufügen">
<Listeners>
<Click Handler="#{HtmlEditor}.setValue(#{HtmlEditor}.getValue()+addLink(#{PageUid}.getValue(),#{DataId}.getValue(), #{DataId}.getText(), #{LinkName}.getValue()))" />
</Listeners>
</ext:ToolbarButton>
My AddLinkButton adds a special linl to my HtmlEditor. But -of course- the link is always added at the end of the HtmlEditor-TextArea.Is there a way to get the current (or last) cursor-position of the HtmlEditor and add the link or any other string there?
Regards,
Martin