TinyMCE soft and hard return

Vote:
 

I'm trying to enable soft retun, meaning soft line breaks. 

When make a regular return following code is generated inside TinyMCE

 

A soft return (shift + return) return 


I have a MVC project with EPiServer CMS 9 installed. Within the web project I have this class, which I believe deals with the customization of TinyMCE

namespace Customer.Web.Templates.Plugins.TinyMCE
{
[TinyMCEPluginNonVisual(AlwaysEnabled = true, EditorInitConfigurationOptions = "{ extended_valid_elements: 'iframe[src|frameborder=0|alt|title|width|height|align|name|style|id|scrolling]' }", ServerSideOnly = true)]
public class ExtendedValidElements
{
}
}



#145774
Mar 11, 2016 10:07
Vote:
 

I would strongly advice against that. It's just wrong.

But anyway this post on Stack Overflow has some options you can try putting on the same level as extended_valid_elements: http://stackoverflow.com/questions/3554338/insert-line-break-instead-of-p-in-tinymce

#145803
Edited, Mar 12, 2016 0:27
Vote:
 

The post is dealing with javascript config, not NET backend

#146137
Mar 16, 2016 9:21
Vote:
 

Yes, and the value of EditorInitConfigurationOptions is a string of javascript. The values of your plugin will merge with Epi's default TinyMCE configuration and change the way an editor instance that has that plugin activated behaves.

Pseudo-code with the example from your post and the link in first reply:

EditorInitConfigurationOptions = @"{
extended_valid_elements: 'iframe[src|frameborder=0|alt|title|width|height|align|name|style|id|scrolling]',
force_p_newlines : false,
force_br_newlines : true,
convert_newlines_to_brs : false,
remove_linebreaks : true
}"
#146485
Mar 16, 2016 13:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.