Fixes the source editor in the Redactor.
This commit is contained in:
parent
60d8e71804
commit
b69f7b649e
|
|
@ -65,7 +65,8 @@
|
|||
top: 32px;
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
.field-richeditor.stretch .redactor_box iframe {
|
||||
.field-richeditor.stretch .redactor_box iframe,
|
||||
.field-richeditor.stretch .redactor_box textarea {
|
||||
display: block;
|
||||
position: absolute;
|
||||
height: 100%!important;
|
||||
|
|
|
|||
|
|
@ -63,25 +63,25 @@
|
|||
}
|
||||
|
||||
RichEditor.prototype.build = function() {
|
||||
var $iframe = $('iframe', this.$el),
|
||||
var $editors = $('iframe, textarea', this.$el),
|
||||
$toolbar = $('.redactor_toolbar', this.$el),
|
||||
$html = $('html')
|
||||
|
||||
if (!$iframe.length)
|
||||
if (!$editors.length)
|
||||
return
|
||||
|
||||
if (this.$el.hasClass('stretch')) {
|
||||
$iframe.css('padding-top', $toolbar.height())
|
||||
$editors.css('padding-top', $toolbar.height())
|
||||
}
|
||||
|
||||
/*
|
||||
* Replicate hotkeys to parent container
|
||||
*/
|
||||
$iframe.contents().find('html').on('keydown', function(event){
|
||||
$editors.contents().find('html').on('keydown', function(event){
|
||||
$html.triggerHandler(event)
|
||||
})
|
||||
|
||||
$iframe.contents().find('html').on('keyup', function(event){
|
||||
$editors.contents().find('html').on('keyup', function(event){
|
||||
$html.triggerHandler(event)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
iframe {
|
||||
iframe, textarea {
|
||||
display: block;
|
||||
position: absolute;
|
||||
height: 100%!important;
|
||||
|
|
|
|||
Loading…
Reference in New Issue