Processing
 

Ace-editor - Can't copy and paste from editor to external application (e.g. Notepad)

01/08/2016 15:14#1

Yass

Member

Joined at: 7 months ago

Post: 1

Thank: 0

Thanked: 0

I have the Ace editor embedded within a .NET application (Target Framework is set to 4.6) and some users are not able to copy and paste content from within the editor to an external document (e.g. to Notepad). Copying from Notepad/any other application to the embedded Ace editor is fine.

I have absolutely no issues on my Windows 8 machine, either with custom Internet options or with the default. Some of my colleagues can't copy and paste, whilst others can. I think it may be a Windows 10 issue because the copy and paste functionality works for all of my colleagues using Windows 8, but it's hit and miss for colleagues using Windows 10.

If I install a fresh copy of Windows 10 on a virtual machine I experience the same problem. I've updated the Internet options (In Internet Explorer - Version 11.162.10586.0) on the virtual machine to match the Internet options on my Windows 8 machine with no luck.

In the Security Settings, I have the following enabled:

  • Active Scripting
  • Allow Programmatic clipboard access

On the affected computers, when copying the content into Notepad, I see just a square, which I'm assuming is ASCII? On Notepad++ I get the text "SOH", only it isn't text as I can't highlight the individual characters. This is the case when copying any content from the editor.

There are no other Internet Options (as far as I can see) that would be affecting the Ace editor. If you know of any setting that may help, please let me know. Also, there are no Application errors in the event log.

This is not technically a programming question, but I still feel it's relevant to StackOverflow. I wasn't sure where else this question would be appropriate. If mods believe this should be on one of the other Stack Exchange sites, feel free to move it.

If you need any more information, please let me know.

UPDATE:

@a user pointed me in the right direction. If you're using the Ace editor in an IE only context, changing the MIME type in the main ace.js file from "text/plain" to "text" should resolve your issues. This work-around won't be suitable for situations where the editor is used in other browsers. In my situation, the editor has been embedded in a .NET application and it's unlikely that it will be used outside of this context.

01/08/2016 15:26Top#2

a user

Member

Joined at: 8 months ago

Post: 2

Thank: 0

Thanked: 0

this can be related to https://github.com/ajaxorg/ace/issues/2913, try updating to the latest version

Similar articles

Window Registry create key not working in java

5 months ago - Reply: 1 - Views: 75

Metro App crash on Windows 10

6 months ago - Reply: 2 - Views: 116

.dll file missing after php upgrade

6 months ago - Reply: 1 - Views: 48

Notepad++ launch multiple HTML within browser

6 months ago - Reply: 0 - Views: 3

Access 2003 freezing

6 months ago - Reply: 0 - Views: 2

Icon Handler Shell Extension not called

6 months ago - Reply: 1 - Views: 23

Border color of combox does not change - Windows 8

7 months ago - Reply: 3 - Views: 140

VB.NET error DatagridViewCellValueChanged Windows 8

7 months ago - Reply: 1 - Views: 40

I made a mistake when installing Hyper-V [on hold]

7 months ago - Reply: 0 - Views: 8

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re