Making redactor almost do what I want?

Permalink 1 user found helpful
Redactor is so much trouble half the time I find it easier to just use the HTML block!

This particular problem is, I have some text...


<p>blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah </p>
<span style="border:1px solid red; background-color:cyan; float:right;width:100px">
<p>where are my keys?</p>
</span>
<p style="margin-left: 40px;" rel="margin-left: 40px;">blip blap bloop blip blap bloop blip blap </p>

working example ->http://jsfiddle.net/m4nyt30a/

When I enter this in redactor HTML mode, it gets mangled into some broken uselessness such as

<p>blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</p>
<p><span style="border:1px solid red; background-color:cyan; float:right;width:100px"></span></p>
<p>where are my keys?</p>
<p style="margin-left: 40px;" rel="margin-left: 40px;">blip blap bloop blip blap bloop blip blap</p>

working example -> http://jsfiddle.net/nz752r2s/

As you can see, it reformats the perfectly good HTML to close the span immediately after the open span tag, thereby rendering it useless.

Is there some of "mangleMode=off" like thing 'trick' to get redactor to actually do what I want, or at least to stop trying to be 'clever' and reformat everything?

Thanks

ntisithoj
 
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi ntisithoj,

Here is a list of settings that Redactor uses.
http://imperavi.com/redactor/docs/settings/...

Instead of overriding redactor.js, you can use this code to change a setting.
https://gist.github.com/hissy/8da3e9ffe9f3935d1be8...
- the code was initially written to change the replaceDivs setting, but should work with other settings
ntisithoj replied on at Permalink Reply
ntisithoj
NICE! Works like a charm :) thanks
mrjcgoodwin replied on at Permalink Reply
mrjcgoodwin
Perfect thanks :-) Just what the doctor ordered!