ервый импорт проекта
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
import Parchment from 'parchment';
|
||||
|
||||
|
||||
class Break extends Parchment.Embed {
|
||||
static value() {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
insertInto(parent, ref) {
|
||||
if (parent.children.length === 0) {
|
||||
super.insertInto(parent, ref);
|
||||
} else {
|
||||
this.remove();
|
||||
}
|
||||
}
|
||||
|
||||
length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
value() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
Break.blotName = 'break';
|
||||
Break.tagName = 'BR';
|
||||
|
||||
|
||||
export default Break;
|
||||
Reference in New Issue
Block a user