We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

RichTextEditor does not work with Bootstrap-Vue

Thread ID:

Created:

Updated:

Platform:

Replies:

149786 Dec 9,2019 02:55 PM UTC Dec 10,2019 06:30 AM UTC Vue 1
loading
Tags: RichTextEditor
Konrad Lowczak
Asked On December 9, 2019 03:02 PM UTC

Hi

Please download and run attached demo.

RichTextEditor does not work when it's placed inside Bootstrap-Vue component.
Behavior and appearance are not the same as expected. For example, please remove "height" attribute inside rte.vue file.
Dependent on height attribute You can edit text or not. Toolbar also looks strange and goes outside border.

Please fix it. Our application uses RTE only inside bootstrap components.

Best regards
Konrad

Attachment: rte_demo_c34a08cf.7z

Pandiyaraj Muniyandi [Syncfusion]
Replied On December 10, 2019 06:30 AM UTC

Hi Konrad, 
 
Greetings from Syncfusion support. 
 
Yes, we could reproduce the reported issue while rendering RTE inside the modal dialog. The height is not calculated properly due to animation delay, so the toolbar misaligned over the editor section and able to access RTE. 
 
We suggest you call the RichTextEditor - refreshUI() public method in modal dialog shown event callback to resolve the toolbar overflow issue. Please find code example is given below, 
 
Main.js 
 
 
import Vue from 'vue' 
import App from './App.vue' 
 
export const bus = new Vue(); 
 
new Vue({ 
  el: '#app', 
  render: h => h(App) 
}) 
 
 
App.vue 
 
 
    <b-modal v-model="isVisible" 
            :hide-footer="true" 
            :no-close-on-esc="true" 
            :no-close-on-backdrop="true" 
            :hide-header-close="true" 
            @shown="onModalShown"> 
          <rte v-model="modalValue 
            :width="WIDTH 
            :height="HEIGHT"> 
          </rte> 
          <b-button size="sm" @click="toggleModal"> 
            {{ 'Close' }} 
          </b-button> 
    </b-modal> 
 
<script> 
  import { bus } from './main'; 
 
  export default { 
    methods: { 
      onModalShown() { 
        bus.$emit('refresh'); 
      } 
    } 
  } 
</script> 
 
 
 
Rte.vue

 
  
 <ejs-richtexteditor ref="rteRef" :created="onCreate"> 
 </ejs-richtexteditor> 
 
 <script> 
    import { bus } from './main'; 
    export default { 
       methods: { 
          onCreate: function() { 
            bus.$on('refresh'this.refreshRte) 
          }, 
          refreshRte() { 
            this.$refs.rteRef.refreshUI(); 
          } 
       } 
    }; 
 </script> 

For your reference, we have modified a sample, please get it from the below link 
 
Note: In the above sample to invoke RTE refreshUI by parent to child component communication using Event Bus approach. 

Regards,
  
Pandiyaraj  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon