簡體   English   中英

如何在文本編輯器中使錨鏈接不可點擊或禁用

[英]How do you make an anchor link non-clickable or disabled in text editor

還需要在文本編輯器中禁用超鏈接。 該字段已被禁用為 [readonly]="true"。 但是附加到 p 編輯器的超鏈接是可點擊的。

代碼:

 <label for="notice">Notice<span class="mandatory">*</span></label> <p-editor [readonly]="isViewDisable" [attr.disabled]="(isViewDisable)" formControlName="noticeText" [(ngModel)]="noticeText" [style]="{'height':'320px'}" [ngClass]="{ 'is-invalid': submitted && p.noticeText.errors }" #editor appRequired> <ng-template pTemplate="header"> <span class="ql-formats"> <select class="ql-size"> <option value="small"></option> <option selected></option> <option value="large"></option> <option value="huge"></option> </select> <button class="ql-bold" aria-label="Bold"></button> <button class="ql-italic" aria-label="Italic"></button> <button class="ql-underline" aria-label="Underline"></button> <span class="ql-formats"> <button class="ql-list" value="ordered"></button> <button class="ql-list" value="bullet"></button> <select title="Text Alignment" class="ql-align" > <option selected>Gauche</option> <option value="center" label="Center"></option> <option value="right" label="Right"></option> <option value="justify" label="Justify"></option> </select> </span> <span class="ql-formats"> <button class="ql-link" aria-label="Link"></button> </span> </span> </ng-template> </p-editor> </div>

您需要添加一個殘疾人班請看下面

.disabled {
   pointer-events: none
 }


<p-editor [ngClass]="{'disabled':isViewDisable}" [readonly]="isViewDisable" [attr.disabled]="(isViewDisable)" formControlName="noticeText" [(ngModel)]="noticeText" [style]="{'height':'320px'}" [ngClass]="{ 'is-invalid': submitted && p.noticeText.errors }" #editor appRequired>
  <ng-template pTemplate="header">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM