在Excel for Windows中,无法在加载项的任务窗格中编辑CodeMirror或Ace [英] Cannot edit CodeMirror or Ace in a taskpane of an add-in in Excel for Windows

查看:264
本文介绍了在Excel for Windows中,无法在加载项的任务窗格中编辑CodeMirror或Ace的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚意识到,我们不能修改CodeMirror中的文本或Windows中的Excel加载项的任务窗格中的Ace。



我做了一个测试html页面与此代码,并将其链接到Excel加载项的清单文件,在。它适用于Excel Online(在Chrome和IE中),Excel for Mac。但是,在Windows的Excel中,1) textarea 效果不错; 2)我们可以把重点放在CodeMirror上,而我们不能输入任何东西。 3)当我们把重点放在Excel上,然后回到Ace,我们不能输入任何东西。



我还没有测试过其他基于JavaScript的源代码编辑器,因为我的网页实际上是用angularjs构建的,我需要 ui-codemirror ui-ace 。我测试了他们,他们有相同的错误,虽然我不会在这里列出测试代码,因为我不认为这是导致问题的 ui - 。 / p>

有人知道这种奇怪的行为吗?我们怎么解决这个问题?是否有任何解决方法或替代方案?



PS:我找到了评论 CodeMirror的作者,但我不知道是否(及如何)可以帮助解决在Excel中的加载项的Windows。



PS2:我刚刚意识到,如果单击Excel,然后单击任务窗格中的无用区域(某处没有元素),然后单击Ace textarea,然后可以编辑其内容。有谁知道如何使用这个来解决Ace的textarea?这个方法不适用于CodeMirror textarea ...

解决方案

我想哟可以按照这里提到的步骤。
我希望这将解决您的问题,因为它解决了该用户的问题:

https://github.com/ajaxorg/ace/issues/3375


I just realized that we cannot modify texts in CodeMirror or Ace in a taskpane of an add-in in Excel for Windows.

I have made a test html page with this code, and link it to a manifest file of an Excel add-in. It works well in Excel Online (in Chrome and IE), Excel for Mac. However, in Excel for Windows, 1) textarea works well; 2) We could put the focus on CodeMirror, whereas we can NOT type anything; 3) When we put the focus on Excel then back on Ace, we can NOT type anything.

I have not tested other JavaScript-based source editor, because my webpage is actually built with angularjs and I need ui-codemirror or ui-ace. I have tested them, they have the same bug, though i will not list the testing code here because I don't think it is the ui- that causes the problem.

Is anyone aware of this odd behavior? How could we fix this? Is there any workaround or alternative?

PS: I have found a comment from the author of the CodeMirror, but I don't know if (and how) it can help fix add-ins in Excel for Windows.

PS2: I just realised that, if we click on Excel, then click on a useless area (somewhere without element) in the taskpane before clicking in the Ace textarea, we could then edit its content. Does anyone know how to use this to make a workaround for the Ace textarea? This method does not work with CodeMirror textarea...

解决方案

I think yo can follow this steps mentioned here. I hope it will solve your issue as it solve the issue for that user:

https://github.com/ajaxorg/ace/issues/3375

这篇关于在Excel for Windows中,无法在加载项的任务窗格中编辑CodeMirror或Ace的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆