0
votes

So I'm in the process of creating a flask application which utilises both CodeMirror and TinyMCE as a Rich Text Editor to render any HTML/CSS input. The user's code is entered in CodeMirror, and using a Post Request, the input from CodeMirror is sent to the TinyMCE StringField. I've been able to implement this fine for standard HTML and CSS however I've been having some issues with script tags. The script tags in TinyMCE are being changed from

<script>
</script>

to

<script type='mce-no/type'>
</script>

This stops the javascript from being rendered in TinyMCE, and I was wondering if there was any solution for this issue in Flask?

1

1 Answers

0
votes

You would only see that if you get the "raw" content from TinyMCE using its getContent({format: 'raw'}) API call. If you use the normal getContent() API call you won't see that odd type value.

TinyMCE won't execute JavaScript during an editing session.