ckeditor4-plugin-a11ychecker icon indicating copy to clipboard operation
ckeditor4-plugin-a11ychecker copied to clipboard

An API for QuickFix to modify button text

Open mlewand opened this issue 10 years ago • 0 comments

Problem

We might create a convenient way to modify QuickFix button text from the QuickFix type itself.

First Proposition

The way I see it is simply exposing function in ViewerForm class, so one may use following code:

MyQuickFixClass.prototype.display = function( form ) {
    form.setQuickFixButton( 'Rename' );
};

Possible Simplification

We might simplyfy it down to setButton or setButtonText name, but since form contains also ignore button, it would make these names ambiguous.

Current Possibilities

It is even somehow possible right now, but it's not intuitive, and button text does not restore to the default one.

MyQuickFixClass.prototype.display = function( form ) {
    // Here we modify the button text.
    form.parts.quickfixButton.setText( 'Rename' );
};

Implementation Guides

It's crucial to restore original button text when loading next issue / QuickFix.

mlewand avatar Nov 03 '14 16:11 mlewand