Skip to content

Commit

Permalink
fix(ngx-codejar): turning off readonly not working on FIrefox
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoemp committed Feb 24, 2024
1 parent 220f9d4 commit d47c716
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/ngx-codejar/src/lib/ngx-code-jar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import {CommonModule} from '@angular/common';
imports: [CommonModule],
selector: 'ngx-codejar',
template: `
<div class="ngx-codejar-wrap ngx-codejar-flex" #wrapper>
<div class="ngx-codejar-wrap ngx-codejar-flex" #wrapper>
<pre #editor class="editor" [ngClass]="{
'hljs': highlighter === 'hljs',
'language-typescript': highlighter === 'prism',
'ngx-codejar-editor': highlighter !== undefined
}" style="padding-bottom:0px;">
</pre>
</div>`,
</div>`,
styles: [`
:host {
display: block;
Expand Down Expand Up @@ -114,7 +114,7 @@ export class NgxCodeJarComponent implements AfterViewInit, OnChanges, OnDestroy
if (this.readonly) {
this.renderer.setAttribute(this.editor?.nativeElement, 'contenteditable', 'none');
} else {
this.renderer.setAttribute(this.editor?.nativeElement, 'contenteditable', 'plaintext-only');
this.renderer.setAttribute(this.editor?.nativeElement, 'contenteditable', 'true');
}
}
}
Expand Down

0 comments on commit d47c716

Please sign in to comment.