acf-code-field icon indicating copy to clipboard operation
acf-code-field copied to clipboard

Updating codemirror to version 5.39

Open aaimaawebs opened this issue 7 years ago • 1 comments

Hey,

Hows you. No updates for a long time? Hope everything fine. I updated codemirror v5.23.0 to v5.39.0 !!

Hope pull request will help community to levrage the changes/fixes happens during 5.23 to 5.39.0 !! :)

aaimaawebs avatar Jul 11 '18 22:07 aaimaawebs

Hi, since Gutemberg, plugin seems not to update fields content, i ended up discovering that the new value is not passed to the orginal textarea, so once you save, changes are not saved.

But, on js/input.js, after editor.refresh();, adding this:

editor.on("change", function(cm, change) { 
	$textarea.val(editor.getValue()); 
});

Textarea value is saved. What you think? Is safe to use this?

Using: WP 5.1.1 ACF 5.7.13

rg- avatar Mar 24 '19 21:03 rg-