@kademi/keditor
Version:
KEditor is a jQuery plugin which provides a content editor with drag n drop, configurable contents
16 lines (12 loc) • 501 B
JavaScript
import CSS_CLASS from '../constants/cssClass';
import setCopyContent from '../utils/setCopyContent';
export default function () {
let self = this;
let contentAreasWrapper = self.contentAreasWrapper;
contentAreasWrapper.on('click', `.${CSS_CLASS.COMPONENT_CUT}`, function (e) {
e.preventDefault();
let btn = $(this);
let component = btn.closest(`.${CSS_CLASS.COMPONENT}`);
setCopyContent.call(self, component, true);
});
};