Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SAPUI5-如何实现RichTextEditor?_Sapui5_Rich Text Editor_Sap Web Ide - Fatal编程技术网

SAPUI5-如何实现RichTextEditor?

SAPUI5-如何实现RichTextEditor?,sapui5,rich-text-editor,sap-web-ide,Sapui5,Rich Text Editor,Sap Web Ide,不确定文档是否过期,但创建新richtext编辑器的标准代码返回 Cannot read property 'RichTextEditor' of undefined 看起来这是因为包含的资源列表中没有sap.ui.richtexteditor var oRichTextEditor1 = new sap.ui.richtexteditor.RichTextEditor("myRTE1", { width:"100%", height:"300px", showGro

不确定文档是否过期,但创建新richtext编辑器的标准代码返回

Cannot read property 'RichTextEditor' of undefined
看起来这是因为包含的资源列表中没有sap.ui.richtexteditor

var oRichTextEditor1 = new sap.ui.richtexteditor.RichTextEditor("myRTE1", {
    width:"100%", 
    height:"300px",
    showGroupClipboard:true,
    showGroupStructure:true,
    showGroupFont:true,
    showGroupInsert:true,
    showGroupLink:true,
    showGroupUndo:true,
    tooltip:"My RTE Tooltip"
});

SAPUI5中RichText/WYSIWYG编辑器的其他选项有哪些?

您应该使用sap.ui.define语法来要求控制器中的RichTextEditor控件。由于控制库未包含在资源中,因此无法随时提供

sap.ui.define([
  "com/sap/app/controller/BaseController",
  .
  .
  .
  "sap/ui/richtexteditor/RichTextEditor"
], function (BaseController, ........, RichTextEditor) {

onAfterRendering: function () {

        var oRichTextEditor1 = new RichTextEditor("myRTE1", {
            width:"100%", 
            height:"300px",
            showGroupClipboard:true,
            showGroupStructure:true,
            showGroupFont:true,
            showGroupInsert:true,
            showGroupLink:true,
            showGroupUndo:true,
            tooltip:"My RTE Tooltip"
        }); 
  } 
});

您应该使用sap.ui.define语法在控制器中要求RichTextEditor控件。由于控制库未包含在资源中,因此无法随时提供

sap.ui.define([
  "com/sap/app/controller/BaseController",
  .
  .
  .
  "sap/ui/richtexteditor/RichTextEditor"
], function (BaseController, ........, RichTextEditor) {

onAfterRendering: function () {

        var oRichTextEditor1 = new RichTextEditor("myRTE1", {
            width:"100%", 
            height:"300px",
            showGroupClipboard:true,
            showGroupStructure:true,
            showGroupFont:true,
            showGroupInsert:true,
            showGroupLink:true,
            showGroupUndo:true,
            tooltip:"My RTE Tooltip"
        }); 
  } 
});

非常感谢斯蒂芬!这在控制器上运行良好,但我在视图中难以实现。。未找到xmlns:rte=“sap.ui.richtexteditor.richtexteditor”&对于控件完成,应为xmlns:rte=“sap.ui.richtexteditor”!非常感谢斯蒂芬!非常感谢斯蒂芬!这在控制器上运行良好,但我在视图中难以实现。。未找到xmlns:rte=“sap.ui.richtexteditor.richtexteditor”&对于控件完成,应为xmlns:rte=“sap.ui.richtexteditor”!非常感谢斯蒂芬!我发现RTE在装订方面非常糟糕。和复杂的编辑/显示切换模式。。。希望在这段时间内效果更好。我发现RTE在装订方面非常糟糕。和复杂的编辑/显示切换模式。。。希望在这段时间内效果更好。