I am trying to make a rich text editor a global variable using the window in UI5 but I keep getting the error "ui5 definition of global variable/api in window object is not permitted (sap-no-global-define
)". My code looks something like this
window.oRichTextEditor = new RichTextEditor("myRTE", {
editorType: sap.ui.richtexteditor.EditorType.TinyMCE4,
width: "100%",
height: "600px",
customToolbar: true,
showGroupFont: true,
showGroupLink: true,
showGroupInsert: true,
value: data,
ready: function () {
this.addButtonGroup("styleselect").addButtonGroup("table");
}
I was wondering why isn't this working? Could some explain the error to me?