mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Text widget annotations: support multiline and read-only fields
Moreover, this patch provides us with a framework for handling field flags in general for all types of widget annotations.
This commit is contained in:
parent
a7c35025fe
commit
f6965fadc0
4 changed files with 76 additions and 7 deletions
|
@ -446,9 +446,15 @@ var TextWidgetAnnotationElement = (
|
|||
|
||||
var element = null;
|
||||
if (this.renderInteractiveForms) {
|
||||
element = document.createElement('input');
|
||||
element.type = 'text';
|
||||
if (this.data.multiLine) {
|
||||
element = document.createElement('textarea');
|
||||
} else {
|
||||
element = document.createElement('input');
|
||||
element.type = 'text';
|
||||
}
|
||||
|
||||
element.value = this.data.fieldValue;
|
||||
element.disabled = this.data.readOnly;
|
||||
|
||||
if (this.data.maxLen !== null) {
|
||||
element.maxLength = this.data.maxLen;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue