TinyMce editor does not focus on caret position but in the middle of the editor when the editor is taller than the screen size. It only happens on enter (new line).
This is more persistant on Firefox browser.
My config:
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> ");
})
}
};
Is there any workaround to this problem?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…