Skip to content

Commit

Permalink
attributes not on text area
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsherrard committed Sep 22, 2016
1 parent 505d5a0 commit e6317c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions acf-code-editor-v5.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public function render_field($field)
$rendered_attributes[$attribute] = $field[$attribute];
}
$value = esc_textarea($field['value']); ?>
<div class='codemirror-wrapper' <?php echo acf_esc_attr($rendered_attributes) ?>>
<textarea><?php echo $value ?></textarea>
<div class='codemirror-wrapper'>
<textarea <?php echo acf_esc_attr($rendered_attributes) ?>><?php echo $value ?></textarea>
</div>
<?php

Expand Down
3 changes: 1 addition & 2 deletions js/custom-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -11149,7 +11149,6 @@ var instantiator = function instantiator(el) {
};

var strict_wysiwyg = function strict_wysiwyg() {
console.log('Interval fired');
if (typeof $ !== 'undefined' && $ !== null) {
clearInterval(sw_interval);
var editors = $('.codemirror-wrapper textarea');
Expand Down Expand Up @@ -11180,7 +11179,7 @@ acf.add_action('append', function ($el) {
if ($field.length) {
var newInstance = instantiator($field[0]);
newInstance.focus();
editorInstances.push(newInstace);
editorInstances.push(newInstance);
}
});

Expand Down
3 changes: 1 addition & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ let instantiator = function(el) {
}

const strict_wysiwyg = function() {
console.log('Interval fired')
if ((typeof $ !== 'undefined' && $ !== null)) {
clearInterval(sw_interval)
var editors = $('.codemirror-wrapper textarea')
Expand Down Expand Up @@ -54,6 +53,6 @@ acf.add_action('append', ( $el ) => {
if ($field.length) {
let newInstance = instantiator($field[0])
newInstance.focus()
editorInstances.push(newInstace)
editorInstances.push(newInstance)
}
})

0 comments on commit e6317c4

Please sign in to comment.