2023-01-11 17:57:42 +00:00
|
|
|
import {makeT} from 'app/client/lib/localization';
|
2022-08-08 13:32:50 +00:00
|
|
|
import {FieldOptions} from 'app/client/widgets/NewBaseEditor';
|
2020-10-02 15:10:00 +00:00
|
|
|
import {NTextEditor} from 'app/client/widgets/NTextEditor';
|
|
|
|
|
2023-01-11 17:57:42 +00:00
|
|
|
const t = makeT('HyperLinkEditor');
|
|
|
|
|
2020-10-02 15:10:00 +00:00
|
|
|
/**
|
|
|
|
* HyperLinkEditor - Is the same NTextEditor but with some placeholder text to help explain
|
|
|
|
* to the user how links should be formatted.
|
|
|
|
*/
|
|
|
|
export class HyperLinkEditor extends NTextEditor {
|
2022-08-08 13:32:50 +00:00
|
|
|
constructor(options: FieldOptions) {
|
2020-10-02 15:10:00 +00:00
|
|
|
super(options);
|
2023-01-11 17:57:42 +00:00
|
|
|
this.textInput.setAttribute('placeholder', t('[link label] url'));
|
2020-10-02 15:10:00 +00:00
|
|
|
}
|
|
|
|
}
|