是否可以禁用tinyMCE 5中的移动UI功能

Gia*_*uca 4 mobile tinymce

是否可以在tinyMCE中禁用移动UI功能,而只显示常规编辑器?我问这是因为它只在移动设备上为我显示一个空白屏幕(当我单击编辑器框中的“书本”图标时。我已经搜索了空白页的解决方案,而我只发现模糊地引用了“父元素的溢出设置为可见以外的任何内容”对我没有多大帮助。

Spy*_*der 6

EDIT November 2019: TinyMCE 5.1 switches to the Silver theme by default on mobile devices. This workaround is no longer necessary.


Our documentation doesn't explicitly explain how to do this, and it isn't something we test so you may run into unexpected issues, but it is certainly possible.

Our mobile UI is implemented as a theme, even in TinyMCE 5, similar to how modern was our desktop theme for version 4 and silver is for version 5. By default when the editor detects it is on a mobile device the theme is set to mobile - we removed this from the v5 docs, but our v4 docs describe the defaults:

tinymce.init({
  selector: 'textarea',
  mobile: {
    theme: 'mobile'
  }
});
Run Code Online (Sandbox Code Playgroud)

By extension of this concept, where the mobile block overrides the config, you can specify the mobile theme to be modern in TinyMCE 4, silver in TinyMCE 5 and the desktop interface will show:

tinymce.init({
  selector: 'textarea',
  mobile: {
    theme: 'silver'
  }
});
Run Code Online (Sandbox Code Playgroud)

I have created a fiddle to demonstrate this which loads the desktop theme on my phone. http://fiddle.tinymce.com/C9gaab/1