【问题标题】:TinyMCE Focus Issue with Popups弹出窗口的 TinyMCE 焦点问题
【发布时间】:2018-05-04 13:53:07
【问题描述】:

我正在使用 TinyMCE 文本编辑器,我想通过单击工具栏按钮来上传图像。但是当弹出窗口打开时..:

  • 我无法选择输入元素。
  • 我无法在输入字段中输入任何图像 URL。

您可以access my code from this link。请看下面的截图。

在这种情况下我该怎么办?

【问题讨论】:

    标签: tinymce sapui5


    【解决方案1】:

    我已使用以下代码解决了我的问题。我希望它可以帮助其他遇到此类问题的人

    openAddCommentDialog: function(oEvent,args) {
          var _this = this;
          if(sap.ui.getCore().byId("codeEditorContainer")){
            sap.ui.getCore().byId("codeEditorContainer").removeAllItems();
          }
          var commentEditor = new RTE({
            editorType: sap.ui.richtexteditor.EditorType.TinyMCE4,
            width:'100%',
            height:'100%',
            customToolbar: false,
            showGroupFont: true,
            showGroupLink: true,
            showGroupInsert: true,
            beforeEditorInit:function(oEvent){
              var config = oEvent.getParameter("configuration");
              config["setup"] = function(editor){
                editor.on('init', function(){
                    if(args && args.commentMessage){
                      editor.setContent(args.commentMessage);
                      oModel.setProperty("/TicketItemModel/CommentTitle",args.commentTitle);
                    }
                    else{
                      if(args && args.commentTitle){
                        oModel.setProperty("/TicketItemModel/CommentTitle",args.commentTitle);
                        editor.setContent(args.commentMessage);
                      }
                      else{
                        oModel.setProperty("/TicketItemModel/CommentTitle","");
                        editor.setContent("");
                      }
                    }
                  })
              }
            }
          });
          if (!this._oDialogAddCommentWindow) {
            this._oDialogAddCommentWindow = sap.ui.xmlfragment("BnetPortal.Application.ToDo.fragments.addComment",this);
          }
          sap.ui.getCore().byId("codeEditorContainer").addItem(commentEditor);
          this._oDialogAddCommentWindow.open();
        },
    

    【讨论】:

    • 您也可以像这样更改编辑器配置 => config.menubar =false; config.language = "tr";
    猜你喜欢
    • 2012-07-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-11
    • 1970-01-01
    • 2011-08-18
    • 1970-01-01
    • 2011-02-15
    相关资源
    最近更新 更多