jQuery UI Widgets › Forums › General Discussions › Editors › Editor › Apply Custom Editor with Custom Action
This topic contains 4 replies, has 2 voices, and was last updated by Hristo 8 years, 8 months ago.
-
Author
-
Dear JQX
as I working with your JQX Editor and I need one feature that can add absolutely one Custom Button in the toolbar.
Here is the screenshot of my editor

what I am looking for is a button having
name: CustomTask
icon: /path/to/custom/icon
custom task: when someone clicks that button how some custom work can be performed, let’s say I want to change the background color to red for the entire text editor.
tooltip: Custom Task is performedthanks
Sumit RoyHello Sumit Roy,
Please, take a look at this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxeditor/javascript-editor-custom-toolbar-items.htm?light
Also, I would like to suggest you look at our API (Styling and Appearance) section for more details.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comthanks a lot hristo,
ok now I have another question, the thing is how can I get the position of the cursor.
example: say I want to a have a custom button, if I click that button it will insert some text like HELLO exactly where the cursor now placed.so here is it:
BEFORE CLICKING THE BUTTON:

AFTER CLICKING THE BUTTON:

please help me to solve this,
thanks a lot lot lot
Sumit RoyHello Sumit Roy,
Unfortunately, we do not have such functionality.
You could try to create a workaround – you could try to bind to click event and save the caret position at this point.
Then when clicking on paste button use this position desired value.
Also, I would like to suggest you as a workaround to use the approach in this demo. (focus on “Insert Custom HTML” the DropDownList).
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comUpdate:
Please, take a look at this example:
https://www.jseditor.io/?key=editor-caret-position-pasteBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.