File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed
15/umbraco-cms/tutorials/creating-a-property-editor Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -142,25 +142,25 @@ constructor() {
142142 ...
143143
144144 const trimmed = (this.value as string).substring(0, this._maxChars);
145- const modalHandler = this.#modalManagerContext?.open(this, UMB_CONFIRM_MODAL,
146- {
147- data: {
148- headline: ` Trim text ` ,
149- content: ` Do you want to trim the text to " ${trimmed}" ? ` ,
150- color: "danger",
151- confirmLabel: "Trim",
152- }
145+ const modalHandler = this.#modalManagerContext?.open(this, UMB_CONFIRM_MODAL,
146+ {
147+ data: {
148+ headline: ` Trim text ` ,
149+ content: ` Do you want to trim the text to " ${trimmed}" ? ` ,
150+ color: "danger",
151+ confirmLabel: "Trim",
153152 }
154- );
155- modalHandler?.onSubmit().then(() => {
156- this.value = trimmed;
157- this.#dispatchChangeEvent();
158- const data: UmbNotificationDefaultData = {
159- headline: ` Text trimmed ` ,
160- message: ` You trimmed the text ! ` ,
161- };
162- this.#notificationContext?.peek("positive", { data });
163- }, null);
153+ }
154+ );
155+ modalHandler?.onSubmit().then(() => {
156+ this.value = trimmed;
157+ this.#dispatchChangeEvent();
158+ const data: UmbNotificationDefaultData = {
159+ headline: ` Text trimmed ` ,
160+ message: ` You trimmed the text ! ` ,
161+ };
162+ this.#notificationContext?.peek("positive", { data });
163+ }, null);
164164}
165165` ` `
166166{% endcode %}
You can’t perform that action at this time.
0 commit comments