kopia lustrzana https://github.com/wagtail/wagtail
Fixes hallotoolbar misplacement within StreamField StructBlock
rodzic
ce251fbd96
commit
0f39001e46
wagtail/wagtailadmin/static_src/wagtailadmin/js
|
@ -27,10 +27,11 @@ function makeHalloRichTextEditable(id) {
|
|||
}
|
||||
|
||||
var closestObj = input.closest('.object');
|
||||
var isDeepNested = input.closest('.struct-block').length;
|
||||
|
||||
richText.hallo({
|
||||
toolbar: 'halloToolbarFixed',
|
||||
toolbarCssClass: (closestObj.hasClass('full')) ? 'full' : (closestObj.hasClass('stream-field')) ? 'stream-field' : '',
|
||||
toolbarCssClass: (closestObj.hasClass('full')) ? 'full' : (closestObj.hasClass('stream-field') && !isDeepNested) ? 'stream-field' : '',
|
||||
plugins: halloPlugins
|
||||
}).bind('hallomodified', function(event, data) {
|
||||
input.val(data.content);
|
||||
|
|
Ładowanie…
Reference in New Issue