"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addYfmHtmlBlock = void 0;
const const_1 = require("./YfmHtmlBlockSpecs/const.js");
exports.addYfmHtmlBlock = {
    isEnable(state) {
        return state.selection.empty;
    },
    run(state, dispatch, _view) {
        dispatch(state.tr.insert(state.selection.from, (0, const_1.yfmHtmlBlockNodeType)(state.schema).create({
            [const_1.YfmHtmlBlockConsts.NodeAttrs.srcdoc]: '\n',
            [const_1.YfmHtmlBlockConsts.NodeAttrs.newCreated]: true,
        })));
    },
};
//# sourceMappingURL=actions.js.map
