* @param id * @param [database] - Database object to access this pad's records (and only this pad's records; * the shared global Etherpad database object is still used for all other pad accesses, such * as copying the pad). Defaults to the shared global Etherpad database object. Thi
(id:string, database = db)
| 174 | * own database table, or to validate imported pad data before it is written to the database. |
| 175 | */ |
| 176 | constructor(id:string, database = db) { |
| 177 | this.db = database; |
| 178 | this.atext = makeAText('\n'); |
| 179 | this.pool = new AttributePool(); |
| 180 | this.head = -1; |
| 181 | this.chatHead = -1; |
| 182 | this.publicStatus = false; |
| 183 | this.id = id; |
| 184 | this.savedRevisions = []; |
| 185 | this.padSettings = Pad.normalizePadSettings(); |
| 186 | } |
| 187 | |
| 188 | static normalizePadSettings(rawPadSettings: any = {}): PadSettings { |
| 189 | const rawView = rawPadSettings.view ?? {}; |
nothing calls this directly
no test coverage detected