diff --git a/app/views/phases/_add_note.html.erb b/app/views/phases/_add_note.html.erb
index cc367af..bcfcab7 100644
--- a/app/views/phases/_add_note.html.erb
+++ b/app/views/phases/_add_note.html.erb
@@ -17,7 +17,7 @@
<%= f.hidden_field :plan_id, value: plan_id %>
<%= text_area_tag "#{questionid}new_note_text", nil, class: "tinymce" %>
- <%= tinymce %>
+ <%= tinymce :content_css => asset_path("application.css"), :setup => "function(editor){editor.on('change', function(e){$.fn.check_textarea(editor)});}" %>
diff --git a/lib/assets/javascripts/plans.js b/lib/assets/javascripts/plans.js
index ebf8d3e..9478e89 100644
--- a/lib/assets/javascripts/plans.js
+++ b/lib/assets/javascripts/plans.js
@@ -390,6 +390,10 @@
}
};
+
+
+
+// this is the function used to hanndle the interface between tinymce and the Dirty stuff
$.fn.check_textarea = function(editor) {
$("#"+editor.id).closest(".accordion-group").find(".section-status:first").toggle_dirty(editor.id.split('-')[2], editor.isDirty());