1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redactor Page Editor 1.0.0 BETA 2

Displays the Redactor HTML editor while editing a page node

  1. Chris D

    Chris D XenForo Developer Staff Member

  2. Chris D

    Chris D XenForo Developer Staff Member

    A page created using the Redactor editor:


    From the Admin CP:


    Some of the CSS I added myself. You can still type the raw HTML in manually, of course. (Left button on the editor).

    The titles are done with:

    <h3 class="textHeading larger">Title</h3>
  3. Andy.N

    Andy.N Well-Known Member

    Hi Chris,
    Thanks for this addon.
    1) Changing h3 to h2 does not seem to make a difference?
    2) If I like to add the Sign up or Log in button to this page, how do I add it?
  4. Chris D

    Chris D XenForo Developer Staff Member

    1) It wouldn't do, necessarily. I won't be altering any core XenForo CSS. With XF CSS <h2> and <h3> on their own have no styling assigned to them.
    2) Beyond the scope of this add-on really. You do it with HTML and CSS. You can do that with or without this add-on.
    Andy.N likes this.
  5. MattW

    MattW Well-Known Member

    Lists don't seem to be displaying correctly by default Chris.

    This is the generated code by the editor:
    <ul><li><span style="line-height: 1.45em;">Removal of advertisements (Adsense and Skimlinks)</span><br></li><li><span style="line-height: 1.45em;">Coloured Usergroup Markup (Your Username will display Orange).</span><br></li><li><span style="line-height: 1.45em;">Access to "private forums" with Premium Member-only materials</span><br></li><li><span style="line-height: 1.45em;">Single Username Change if Required</span><br></li><li><span style="line-height: 1.45em;">Your own @z22se.co.uk e-mail address</span><br></li><li><span style="line-height: 1.45em;">A 10% discount on various products in our online shop</span><br></li></ul>
    How it looks

    I've had to edit the html and wrap it in the baseHtml div to get the list to display


    BUT, when you go back to edit the page, it's removed the DIV I've put in.
  6. Chris D

    Chris D XenForo Developer Staff Member

    Correct. It won't display lists by default. Because XenForo doesn't. So the baseHtml class is the correct thing to do.

    I've seen it get removed too. That looks to be a Redactor bug, though, so we can't do anything about it. I'm experiencing the same quirk and I'm just re-adding it, which is annoying, but I will probably be changing the page node container template to include it in all pages by default.
  7. Chris D

    Chris D XenForo Developer Staff Member

    I have been too hasty... I think there is a configuration for this which is enabled by default. How bizarre!

    Let me test it.
    MattW likes this.
  8. Chris D

    Chris D XenForo Developer Staff Member

    Chris D updated Redactor Page Editor with a new update entry:

    Disables the convertDivs setting

    Read the rest of this update entry...
  9. Martok

    Martok Well-Known Member

    This looks great, I'll be installing it as it'll give me the combination of WYSIWYG and HTML editing all in one place in the ACP. :)

    Where in pagenode_container should this be added? I'll probably do the same thing though I'll likely use messageText ugc baseHtml.
  10. Chris D

    Chris D XenForo Developer Staff Member

    Don't worry about it.

    The latest update resolves the issue.

    There is a default setting that converts <div class="baseHtml"></div> to <p></p> (with your existing code remaining between the tags). I disabled that in the most recent update.

    So now, if you wrap your content in a div with the baseHtml class then things like bullet points etc. will work.
    Martok likes this.
  11. Martok

    Martok Well-Known Member

    Sorry, I misinterpreted what you were saying there, I thought you were indicating a way to have baseHtml included automatically by editing pagenode_container. Not a problem for me to manually add the code when creating a new page node though. :)
  12. Chris D

    Chris D XenForo Developer Staff Member

    Well, yes, you can still do that. But I only suggested it because Redactor was stripping divs.

    Without the add on you would still need to add a baseHtml container manually any way if you wanted some styling to work as expected.
  13. oman

    oman Well-Known Member

    Hi @Chris D

    Is there any chance you could make this work with the new custom help pages feature of XenForo?

    otto, csgofrance and Allan like this.
  14. Allan

    Allan Well-Known Member

    Good question !
    csgofrance likes this.
  15. yavuz

    yavuz Well-Known Member

    Hi @Chris D any plans on supporting this further for 1.4 (help pages)?
    otto likes this.
  16. Andrej

    Andrej Well-Known Member

    Would be interested to know that as well. :)
    csgofrance and oman like this.
  17. otto

    otto Well-Known Member

    Hello Chris,

    it runs good under xenforo 1.4.x - thanks. :)

    And a question - as a missed feature request, can you add file upload? This woul be more comfortable than image linking eg. ;)

    xfstyle likes this.
  18. xfstyle

    xfstyle Member

    (y) @Chris D
    otto likes this.
  19. Bionic Rooster

    Bionic Rooster Well-Known Member

    @Chris D The title doesn't suggest so but I was wondering if this is out of beta yet? And will it work with xF 1.5?
  20. Chris D

    Chris D XenForo Developer Staff Member

    It's pretty stable with no known bugs, so I guess it is out of beta already, it just hasn't had any updates.

    Yes, it will work with XF 1.5.

Share This Page