EasyUI Forum
April 19, 2024, 03:52:16 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] Drage and Drop Treeview node text to codemirror code editor  (Read 3630 times)
jahangir
Jr. Member
**
Posts: 50



View Profile Email
« on: February 02, 2021, 04:34:36 AM »

I am building a web based sql query editer with easyui, I have put all things together and every thing is working perfectly.
Now I wants to drage and drop table name or field name from easyui treeview on to codemirror code editer but did not know how to do this.
« Last Edit: February 07, 2021, 03:51:00 AM by jahangir » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: February 03, 2021, 11:47:21 PM »

Please refer to this example http://code.reloado.com/ubucoj3/edit#preview
Logged
jahangir
Jr. Member
**
Posts: 50



View Profile Email
« Reply #2 on: February 05, 2021, 04:23:39 AM »

Thanks jarry for this example code, but unfortunately this did not solve my problem, it appends text to a div and I wanted to insert text on any cursor location on a code editor or at least on a textarea element instead of div.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: February 06, 2021, 07:18:59 PM »

This is the example shows how to drag a tree node and drop it on a textarea element.
http://code.reloado.com/ubucoj3/2/edit#preview
Logged
jahangir
Jr. Member
**
Posts: 50



View Profile Email
« Reply #4 on: February 07, 2021, 03:50:20 AM »

Thanks Jarry this also did not solve the problem actually I wanted to insert text at any cursor location instead of inserting text on a new line.

However, after some search on google I found the solution to my problem.

Following is the example for those who wanted this functionality.

http://code.reloado.com/ubucoj3/7/edit#preview
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!