diff --git a/frontend/src/Campaign.js b/frontend/src/Campaign.js
index 57dcb7b..6b4eb58 100644
--- a/frontend/src/Campaign.js
+++ b/frontend/src/Campaign.js
@@ -37,8 +37,8 @@ class Editor extends React.PureComponent {
editor: null,
quill: null,
rawInput: null,
- selContentType: "richtext",
- contentType: "richtext",
+ selContentType: cs.CampaignContentTypeRichtext,
+ contentType: cs.CampaignContentTypeRichtext,
body: ""
}
@@ -108,11 +108,11 @@ class Editor extends React.PureComponent {
// Switching from richtext to html.
let body = ""
- if (this.state.selContentType === "html") {
+ if (this.state.selContentType === cs.CampaignContentTypeHTML) {
body = this.state.quill.editor.container.firstChild.innerHTML
// eslint-disable-next-line
this.state.rawInput.value = body
- } else if (this.state.selContentType === "richtext") {
+ } else if (this.state.selContentType === cs.CampaignContentTypeRichtext) {
body = this.state.rawInput.value
this.state.quill.editor.clipboard.dangerouslyPasteHTML(body, "raw")
}
@@ -135,8 +135,8 @@ class Editor extends React.PureComponent {
style={{ minWidth: 200 }}
value={this.state.selContentType}
>
-