kopia lustrzana https://github.com/wagtail/wagtail
Remove misleading dynamic text for split command
The splitter always splits into 2 - the number of blocks in the content is not relevant.pull/9339/head
rodzic
80f17710d1
commit
0de901014b
|
@ -298,13 +298,6 @@ class BoundDraftailWidget {
|
|||
icon: '#icon-cut',
|
||||
description: gettext('Split block'),
|
||||
type: 'split',
|
||||
render: ({ option, getEditorState }) => {
|
||||
const editorState = getEditorState();
|
||||
const content = editorState.getCurrentContent();
|
||||
const blocks = content.getBlockMap();
|
||||
const text = `${option.description} (will split ${blocks.size} blocks)`;
|
||||
return text;
|
||||
},
|
||||
onSelect: ({ editorState }) => {
|
||||
const result = window.draftail.splitState(
|
||||
window.draftail.DraftUtils.resetBlockWithType(
|
||||
|
|
Ładowanie…
Reference in New Issue