Skip to Content
0
Oct 26, 2017 at 11:50 AM

How to ensure a component is loaded after a library is loaded

33 Views

Hi Experts,

I met a strange thing when using richtextEditor with type M

<script id="sap-ui-bootstrap"

....

data-sap-ui-libs="sap.ui.richtexteditor, sap.m"

Then I can get the fiori editor expected.

However, If I remove it from "data-sap-ui-libs" but add a new line in my component's meta data like below

"dependencies": {

"minUI5Version": "1.48.0",

"libs": { "sap.ui.core": {}, "sap.m": {}, "sap.ui.layout": {}, "sap.ushell": {}, "sap.collaboration": {}, "sap.ui.comp": {}, "sap.uxap": {}, "sap.ui.richtexteditor" :{} } },

I can't see the customized fiori toobar.

Is there anything wrong? I guess add sap.ui.richtexteditor in dependencies of component, then the component will load all the source of it but what I observed is no.

As the component is used by other app, I can't ask the user add things in their index.html. I'm looking for a solution to ensure it loaded in component.js

Any idea?