| 1234567891011121314 |
- <div class="editor" [attr.aria-busy]="disabled">
- <div class="tools" role="group" aria-label="正文编辑工具">
- <button type="button" class="add-images" [disabled]="disabled" (mousedown)="$event.preventDefault()" (click)="chooseImages(images)">添加多张图片</button>
- <input #images type="file" hidden multiple accept="image/jpeg,image/png,image/webp,image/gif" [disabled]="disabled" (change)="filesChanged($event)"/>
- @for (tool of tools; track tool.label) {
- <button type="button" [disabled]="disabled" (mousedown)="$event.preventDefault()" (click)="format(tool.command, tool.value)">{{tool.label}}</button>
- }
- </div>
- <div #body class="body" role="textbox" aria-label="图文正文" aria-multiline="true" aria-describedby="training-body-help" tabindex="0"
- [attr.contenteditable]="!disabled" [attr.aria-disabled]="disabled" data-placeholder="在这里输入正文,或添加多张图片…"
- (input)="changed()" (keyup)="rememberSelection()" (mouseup)="rememberSelection()" (blur)="rememberSelection()"
- (paste)="paste($event)" (dragover)="$event.preventDefault()" (drop)="drop($event)"></div>
- </div>
- <small id="training-body-help">支持多选、粘贴或拖入图片,每次最多 20 张、每张不超过 10 MB(GIF 不超过 2 MB)。图片保留比例,大图自动压缩;选中图片后可按删除键移除。粘贴文字时自动去除外部格式。</small>
|