1

我在我的 rails 应用程序中添加了“gem 'tinymce-rails'” 我在我的 application.js 中添加了“//= require tinymce-jquery”

在我的 js.erb 文件中,我使用

tinyMCE.init({
  selector: '#offer_description',
  menubar: false,
  branding: false,
  height: 300
});

在编辑时,我使用重新初始化它

tinymce.EditorManager.execCommand('mceRemoveEditor',true, (tinymce.EditorManager.activeEditor != null) ? tinymce.EditorManager.activeEditor.id : null);

tinymce.EditorManager.execCommand('mceAddEditor',true, (tinymce.EditorManager.activeEditor != null) ? tinymce.EditorManager.activeEditor.id : null);

在我的视图页面中,我添加了这样的“tinymce”类:-

= form.text_area :description, :maxlength => "5000", :class => "listing_description_textarea tinymce"

它在 Firefox 和 google chrome 中运行良好。但是在谷歌浏览器的移动视图中,它显示了一个中间有一个书本图标的黑框,并且文本区域不起作用。浏览器控制台和 Ubuntu 终端没有错误。我应该怎么做才能让它正常工作?

此错误显示在移动视图中,而不是 tinymce 文本编辑器

4

0 回答 0