Ticket #7828 (new defect)

Opened 3 months ago

Last modified 7 weeks ago

dijit._editor._Plugin: custom plugins UI does not show up if they are meant to handle custom commands

Reported by: lipik Owned by:
Priority: normal Milestone: 1.5
Component: Dijit Version: 1.2.0
Severity: normal Keywords:
Cc:

Description

I am creating a pluging to handle the save command - a button is displayed that would carry out some custom action (save editor content upon being clicked). However, the UI comes in hidden due to the following code in _Plugin.js:

if (!this.editor.queryCommandAvailable(this.command)) {
 // console.debug("hiding:", this.command);
 if(this.button){
	this.button.domNode.style.display = "none";
 }
}

It should be changed to:

if (this.useDefaultCommand && !this.editor.queryCommandAvailable(this.command)) {
 // console.debug("hiding:", this.command);
 if(this.button){
	this.button.domNode.style.display = "none";
 }
}

Change History

Changed 2 months ago by bill

I'm not sure what useDefaultCommand is for? There aren't any comments in the code. Can you explain what that parameter is for?

Changed 7 weeks ago by bill

  • milestone changed from tbd to 1.5

Changed 7 weeks ago by liucougar

useDefaultCommand determines whether the function is provided by the native browser or not

so I think the suggested change should be made

Note: See TracTickets for help on using tickets.