@foodcat:
Thanks for letting me know! I’ll take a look at this bug for the next update.
@foodcat: I can’t seem to recreate this issue on my development or demo sites. Can you let me know where you’re seeing this error and whether you’re seeing it with only new recipes or all recipes?
Thread Starter
Sandra
(@foodcat)
I found the reason:
If you open the editor in text mode first (so TinyMCE isn’t initialized) the error occurs. So you can’t save your templates only using text mode.
The problem I have: the TinyMCE adds some p in my bootstrap rows where there should be, so I nearly use text mode all the time.
So you have to initialize tinymce first or make a simple if that for saving (pseudocode):
var valueoffield= null;
if (tinymce.get("_recipe_settings_content") is null) {
valueoffield=document.getElementById('_recipe_settings_content').value;
} else {
valueoffield=tinymce.get("_recipe_settings_content");
}
restoring
var newvalueoffield= getSavedDataFromDatabase();
if (tinymce.get("_recipe_settings_content") is null) { document.getElementById('_recipe_settings_content').value(newvalueoffield);
} else {
tinymce.get("_recipe_settings_content").setContent(newvalueoffield);
}
I hope, I explained things clearly ^^”
I also found something strange:
If you open a new recipe the standard, you saved loads- fine. If you press restore now, the plugins first config loads – bug or feature ;).
-
This reply was modified 8 years, 6 months ago by
Sandra.
-
This reply was modified 8 years, 6 months ago by
Sandra.
Thanks so much for letting me know. I will have this fixed in the next update. π