3

The rich text editor redactor is adding in additional p tags to rich text content. Is there a way to modify this so it accepts the unmodified HTML but still has the advantage of WYSIWYG editing?

Perhaps it is fixed in version 10.0.1 as I see Craft uses v9.2.6 of this editor. Will it be upgraded perhaps to test?

Update: This seems to be part of the config: http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs

I believe we should be able to turn on/off some things. e.g. http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize

  • Do I get this right, you want to enter/edit HTML code in rich text fields? – carlcs Oct 10 '14 at 10:24
  • Nup - I can do that already. The problem is toggling between code/wysiwyg is adding p tags in place of my div tags. – Ryan Oct 12 '14 at 6:34
7

http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize

Standard.json

{
    buttons: ['html','formatting','bold','italic','unorderedlist','orderedlist','link','image','video', 'table'],
    plugins: ['fullscreen'],
    toolbarFixedBox: true,
    paragraphize: false,
    replaceDivs: false
}

Edit: This bug also happens in the most recent version of Redactor as seen on their example page.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.