1. <legend id='tceoX'><style id='tceoX'><dir id='tceoX'><q id='tceoX'></q></dir></style></legend>

      1. <small id='tceoX'></small><noframes id='tceoX'>

      2. <i id='tceoX'><tr id='tceoX'><dt id='tceoX'><q id='tceoX'><span id='tceoX'><b id='tceoX'><form id='tceoX'><ins id='tceoX'></ins><ul id='tceoX'></ul><sub id='tceoX'></sub></form><legend id='tceoX'></legend><bdo id='tceoX'><pre id='tceoX'><center id='tceoX'></center></pre></bdo></b><th id='tceoX'></th></span></q></dt></tr></i><div id='tceoX'><tfoot id='tceoX'></tfoot><dl id='tceoX'><fieldset id='tceoX'></fieldset></dl></div>
          <bdo id='tceoX'></bdo><ul id='tceoX'></ul>
        <tfoot id='tceoX'></tfoot>

        如何在现有网页编辑器面板中提供自定义组件

        时间:2023-08-22

        <small id='qtIhY'></small><noframes id='qtIhY'>

            <i id='qtIhY'><tr id='qtIhY'><dt id='qtIhY'><q id='qtIhY'><span id='qtIhY'><b id='qtIhY'><form id='qtIhY'><ins id='qtIhY'></ins><ul id='qtIhY'></ul><sub id='qtIhY'></sub></form><legend id='qtIhY'></legend><bdo id='qtIhY'><pre id='qtIhY'><center id='qtIhY'></center></pre></bdo></b><th id='qtIhY'></th></span></q></dt></tr></i><div id='qtIhY'><tfoot id='qtIhY'></tfoot><dl id='qtIhY'><fieldset id='qtIhY'></fieldset></dl></div>
          • <tfoot id='qtIhY'></tfoot>
              <tbody id='qtIhY'></tbody>
              <bdo id='qtIhY'></bdo><ul id='qtIhY'></ul>
              <legend id='qtIhY'><style id='qtIhY'><dir id='qtIhY'><q id='qtIhY'></q></dir></style></legend>

                  本文介绍了如何在现有网页编辑器面板中提供自定义组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在名为myHTMLComponent"的网页编辑器面板中添加一个新的自定义组件.因此,只要用户使用 WPE 打开任何 html 页面,myHTMLComponentM 就应该出现在那里.我该怎么做呢?此外,这个组件还需要相应地生成代码更改.如何达到预期的效果.

                  I want to add a new custom component in the Web page Editor Palete named "myHTMLComponent". So, as soon as user opens any html page with WPE, myHTMLComponentM should be present there. How can I do the needful, moreover this component will as well need to generate the code changes accordingly. How to achieve the desired result.

                  对此我有什么意见吗?我已经创建了标准元数据标签,但是接下来呢!

                  Is there any input I can get for this. I already created standardmetadata tag, but what next!

                  推荐答案

                  终于找到了问题的解决方案.

                  Finally, I found the solution of the problem.

                  要在调色板中添加新类别,我们需要在 plugin.xml 中使用 pagedesignerextension,如下 -

                  For adding new categories in the palette, we need to use pagedesignerextension in plugin.xml as following -

                  <extension
                  point="org.eclipse.jst.pagedesigner.pageDesignerExtension">
                  <paletteFactory
                  class="com.comp.myeditor.palette.CustomEditorPaletteFactory">
                  </paletteFactory>
                  </extension>
                  

                  CustomEditorPaletteFactory 将扩展 AbstractPaletteFactory.在 createPaletteRoot() 中,我们可以添加我们的类别.

                  Where CustomEditorPaletteFactory will be extending AbstractPaletteFactory. Here in createPaletteRoot(), we can add our category.

                  public PaletteRoot createPaletteRoot(IEditorInput editorInput){
                  PaletteRoot paletteRoot = new PaletteRoot();
                  paletteRoot.add(createStandardComponents());
                  return paletteRoot;
                  //return null;
                  }
                  
                  
                  private static PaletteContainer createStandardComponents() {
                  PaletteDrawer componentsDrawer = new PaletteDrawer("CustomHTMLComponent");
                  
                  TagToolPaletteEntry paletteEntry = new TagToolPaletteEntry(
                  new FormPaletteComponent(".....);
                  componentsDrawer.add(paletteEntry);
                  
                  return componentsDrawer;
                  }
                  

                  这将在调色板中创建组件类别,我们可以使用 componentsdrawer 添加任意数量的组件.

                  This will create the component category in the palette and we can add as many components as needed using the componentsdrawer.

                  在现有类别中添加新类别 -在构造函数中添加这个 -

                  For adding a new category in the existing one - Add this in the constructor -

                  super();
                          this._paletteContext = PaletteItemManager.createPaletteContext(file);
                          this._manager = PaletteItemManager.getInstance(_paletteContext);
                  

                  然后像这样使用 Palette Grouping -

                  Then use Palette Grouping like this -

                  PaletteGroup controls = new PaletteGroup("CUST HTML");
                          super.add(controls);
                  
                          ToolEntry tool = new SelectionToolEntry("CUST Cursor",
                                  "Cursor DESCRIPTION");
                  
                          controls.add(tool);
                          setDefaultEntry(tool);
                  //Custom Marquee
                          controls.add(new MarqueeToolEntry("Marquee", "Marquee Desc"));
                  
                          controls.add(new PaletteSeparator());
                  //This class maintins or load all categories features
                          controls.add(new CustomComponentToolEntry("Custom Component", "Custom Component Descrition", 
                  

                  这篇关于如何在现有网页编辑器面板中提供自定义组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Apache Derby Eclipse 插件去哪儿了? 下一篇:暂时禁用 Eclipse 插件

                  相关文章

                  • <bdo id='3vUUH'></bdo><ul id='3vUUH'></ul>

                1. <tfoot id='3vUUH'></tfoot><legend id='3vUUH'><style id='3vUUH'><dir id='3vUUH'><q id='3vUUH'></q></dir></style></legend>

                  <small id='3vUUH'></small><noframes id='3vUUH'>

                  1. <i id='3vUUH'><tr id='3vUUH'><dt id='3vUUH'><q id='3vUUH'><span id='3vUUH'><b id='3vUUH'><form id='3vUUH'><ins id='3vUUH'></ins><ul id='3vUUH'></ul><sub id='3vUUH'></sub></form><legend id='3vUUH'></legend><bdo id='3vUUH'><pre id='3vUUH'><center id='3vUUH'></center></pre></bdo></b><th id='3vUUH'></th></span></q></dt></tr></i><div id='3vUUH'><tfoot id='3vUUH'></tfoot><dl id='3vUUH'><fieldset id='3vUUH'></fieldset></dl></div>