Ruby on Rails 4中如何实现连续选择而非不连续选择功能?

2026-04-11 15:191阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计212个文字,预计阅读时间需要1分钟。

Ruby on Rails 4中如何实现连续选择而非不连续选择功能?

我在尝试使用bootstrap-wysi5-rails,目前使用的是twitter bootstrap 2。但在处理图像时遇到了错误:Discontiguous selection is not supported. 我尝试了rangy库,但初始化为false。看起来是scr的问题。

我正在尝试bootstrap-wysi html5-rails,我正在使用twitter bootstrap 2

但是当我在图像中得到这个结果时,错误:

Discontiguous selection is not supported.

我试图窗口[‘rangy’].initialized = false;像这样:

<script type="text/javascript"> $(document).ready(function(){ window['rangy'].initialized = false; $('.wysihtml5').each(function(i, elem) { $(elem).wysihtml5(); }); }) </script>

但我仍然得到同样的错误,我可以忍受它,但它似乎打破了编辑器的按钮,如图像,任何人都可以帮助?

Ruby on Rails 4中如何实现连续选择而非不连续选择功能?

只需添加window.getSelection().removeAllRanges();在你的代码之后,这将是神奇的.

本文共计212个文字,预计阅读时间需要1分钟。

Ruby on Rails 4中如何实现连续选择而非不连续选择功能?

我在尝试使用bootstrap-wysi5-rails,目前使用的是twitter bootstrap 2。但在处理图像时遇到了错误:Discontiguous selection is not supported. 我尝试了rangy库,但初始化为false。看起来是scr的问题。

我正在尝试bootstrap-wysi html5-rails,我正在使用twitter bootstrap 2

但是当我在图像中得到这个结果时,错误:

Discontiguous selection is not supported.

我试图窗口[‘rangy’].initialized = false;像这样:

<script type="text/javascript"> $(document).ready(function(){ window['rangy'].initialized = false; $('.wysihtml5').each(function(i, elem) { $(elem).wysihtml5(); }); }) </script>

但我仍然得到同样的错误,我可以忍受它,但它似乎打破了编辑器的按钮,如图像,任何人都可以帮助?

Ruby on Rails 4中如何实现连续选择而非不连续选择功能?

只需添加window.getSelection().removeAllRanges();在你的代码之后,这将是神奇的.