dojox/editor/plugins/InsertEntity.js

  • Provides:

    • dojox.editor.plugins.InsertEntity
  • dojox.editor.plugins.InsertEntity

    • type
      Function
    • chains:
      • dijit._editor._Plugin: (prototype)
      • dijit._editor._Plugin: (call)
    • summary
      This plugin allows the user to select from standard Symbols (HTML Entities)
      to insert at the current cursor position.  It binds to the key pattern:
      ctrl-shift-s for opening the insert symbol dropdown.
    • description
      The commands provided by this plugin are:
      * insertEntity - inserts the selected HTML entity character
  • dojox.editor.plugins.InsertEntity.iconClassPrefix

    • tags: const
    • type
      String
    • summary
      The CSS class name for the button node is formed from `iconClassPrefix` and `command`
  • dojox.editor.plugins.InsertEntity._initButton

    • type
      Function
    • source: [view]
        this.dropDown = new dojox.editor.plugins.EntityPalette({showCode: this.showCode, showEntityName: this.showEntityName});
        this.connect(this.dropDown, "onChange", function(entity){
         this.button.closeDropDown();
         this.editor.focus();
         this.editor.execCommand("inserthtml",entity);
        });
        var strings = dojo.i18n.getLocalization("dojox.editor.plugins", "InsertEntity");
        this.button = new dijit.form.DropDownButton({
         label: strings["insertEntity"],
         showLabel: false,
         iconClass: this.iconClassPrefix + " " + this.iconClassPrefix + "InsertEntity",
         tabIndex: "-1",
         dropDown: this.dropDown
        });
    • summary
      Over-ride for creation of the save button.
  • dojox.editor.plugins.InsertEntity.updateState

    • type
      Function
    • source: [view]
        this.button.set("disabled", this.get("disabled"));
    • summary
      Over-ride for button state control for disabled to work.
  • dojox.editor.plugins.InsertEntity.setEditor

    • type
      Function
    • parameters:
      • editor: (typeof Object)
        The editor to configure for this plugin to use.
    • source: [view]
        this.editor = editor;
        this._initButton();


        this.editor.addKeyHandler("s", true, true, dojo.hitch(this, function(){
         this.button.openDropDown();
         this.dropDown.focus();
        }));


        editor.contentPreFilters.push(this._preFilterEntities);
        editor.contentPostFilters.push(this._postFilterEntities);
    • summary
      Over-ride for the setting of the editor.
  • dojox.editor.plugins.InsertEntity._preFilterEntities

    • type
      Function
    • parameters:
      • s: (typeof String content passed in)
    • source: [view]
        return dojox.html.entities.decode(s, dojox.html.entities.latin);
    • summary
      A function to filter out entity characters into their UTF-8 character form
      displayed in the editor.  It gets registered with the preFilters
      of the editor.
    • tags:
  • dojox.editor.plugins.InsertEntity._postFilterEntities

    • type
      Function
    • parameters:
      • s: (typeof String content passed in)
    • source: [view]
        return dojox.html.entities.encode(s, dojox.html.entities.latin);
    • summary
      A function to filter out entity characters into encoded form so they
      are properly displayed in the editor.  It gets registered with the
      postFilters of the editor.
    • tags:
  • dojox.editor.plugins.InsertEntity.dropDown

    • summary
  • dojox.editor.plugins.InsertEntity.button

    • summary
  • dojox.editor.plugins.InsertEntity.editor

    • summary
  • dojox.editor.plugins.InsertEntity.setEditor.editor

    • type
      Object
    • summary
      The editor to configure for this plugin to use.
  • name

    • summary
  • o.plugin

    • summary
  • dojox.editor.plugins

    • type
      Object
    • summary
  • dojox.editor

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary