"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const field_1 = require("../../../../../client/field");
class EditableField extends field_1.Field {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElement('div'), {
            valueKey: 'innerText',
            defaultStyle: $system.style['editablefield'],
            defaultValue: '',
            defaultAttr: {
                contenteditable: 'true',
                spellcheck: 'false',
                autocapitalize: 'off',
            },
        });
    }
    blur() {
        const { api: { document: { getSelection }, }, } = this.$system;
        super.blur();
        getSelection().removeAllRanges();
    }
}
exports.default = EditableField;
//# sourceMappingURL=Component.js.map