TinyMce 在大于屏幕高度的文本上滚动问题

时间:2021-01-11 12:34:04

标签: javascript angular tinymce tinymce-4

TinyMce 编辑器不关注插入符号位置,而是在编辑器高于屏幕尺寸时位于编辑器的中间。它只发生在输入(新行)。

这在 Firefox 浏览器上更持久。

我的配置:

public config: any = {
mode: 'exact',
selector: 'textarea',
autoresize_bottom_margin: 50,
skin: false,
content_css: '/assets/skins/content.css',
menubar: false,
height: 150,
width: 1000,
min_width: 600,
max_width: 1000,
min_height: 150,
toolbar: [
  'print | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect fontsizeselect fontselect  forecolor backcolor insertdatetime',
  'cut copy paste | numlist bullist | indent outdent | undo redo | link unlink anchor image | hr removeformat  | subscript superscript | charmap emoticons'
],
toolbar_items_size : 'small',
plugins: ['lists', 'autoresize', 'link', 'anchor', 'code', 'hr', 'charmap', 'insertdatetime', 'emoticons', 'image', 'imagetools', 'paste'],
image_advtab: true,
paste_as_text: false,
resize: 'both',
statusbar: true,
toolbar_persist: true,
toolbar_sticky: true,
paste_data_images: true,
powerpaste_allow_local_images: true,
powerpaste_word_import: 'prompt',
contextmenu: 'cut copy paste image imagetools ',
forced_root_block: false,
autofocus: false,
id: 'tinymce',
setup: editor => {
  editor.on('init', _ => {
    this.editor = editor;
    this.editor.execCommand('mceInsertContent', false, "</br> ");
  })
}
};

是否有解决此问题的方法?

0 个答案:

没有答案