UNPKG

ucan-ext-js-kitchen-sink

Version:

my-ext-gen-app description for Ext JS app MyExtGenApp

82 lines (81 loc) 2.14 kB
Ext.define('UCANSink.view.componentDetail.examples.nativeFroala.exampleView', { extend: 'Ext.Container', xtype: 'ucannativeFroalaexampleview', controller: 'ucannativeFroalaexamplecontroller', viewModel: { type: 'ucannativeFroalaexampleviewmodel' }, requires: [ 'UCAN.nativeFroala.src.*', 'Ext.*' ], items: [ { xtype: 'labelTapToggleField', label: 'Froala sperren', bind: { value: '{disableFroala}' } }, { xtype: 'button', text: 'Change editor config', handler: function() { this.next('ucanNativeFroala').setEditorConfig({ placeholderText: 'Neue Config mit neuem Placeholder', attribution: true, language: 'de', heightMin: 50, charCounterCount: true, events: { keyup: function() { console.log("done") this.selection.setAtEnd(this.$el.get(0)); this.selection.restore(); } } }) } }, { xtype: 'button', text: 'Set at end test', handler: function() { const editor = this.next('ucanNativeFroala').getFroalaEditor() editor.selection.setAtEnd(editor.$el.get(0)); editor.selection.restore(); } }, { xtype: 'ucanToolbarFroala', cls: 'toolbar-ucan' }, { xtype: 'ucanNativeFroala', autoHideToolbar: true, bind: { value: '{text}', disabled: '{disableFroala}' }, editorConfig: { placeholderText: 'Antwort hier eingeben und so', toolbarButtons: ['bold', 'quote', 'wirisEditor', 'wirisChemistry'], imageEditButtons: ['wirisEditor', 'wirisChemistry'], htmlAllowedTags: [' .* '], htmlAllowedAttrs: [' .* '], htmlAllowedEmptyTags: ['mprescripts', 'none'], attribution: false, heightMin: 32, language: 'en', charCounterCount: false, toolbarContainer: '.toolbar-ucan' } }, { xtype: 'component', bind: { html: 'Text in VM: ' + '{text}' } } ] });