Prithwiraj Bose
Prithwiraj Bose

Reputation: 29

Writing <code> snippets with TinyMCE Editor and render using CodeMirror code highlighter

Please have a look at the following URL http://sribasu.com/blog/2_programming-tutorials/5_getting-value-of-radio-button-and-checkbox-using-jquery-cross-browser.html (fortunately I managed to show the codes properly on this page now, by inserting \n from DB)

I'm using TinyMCE Editor to create content of my web pages. Although, I'm struggling with a strange issue. My Code Highlighter plugin CodeMirror expects newline (\n) character as line separator, instead of
tags. But, TinyMCE editor will never let me insert \n as newline. How can I create a HTML content (in my case, my blog post) with TinyMCE editor, so that it renders all the [Enter] key press as \n instead of
tag, when I'm writing within tag?

Upvotes: 0

Views: 1018

Answers (1)

Thariama
Thariama

Reputation: 50832

I don't know much about CodeMirror, but is it possible to modify the tinymce code BEFORE you give it to codeMirror? In this case you would have alook at the end of paragraphs and insert a \n there.

Upvotes: 1

Related Questions