• 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

No permission to download

Chris D

XenForo developer
Staff member
#2
A page created using the Redactor editor:

upload_2014-6-1_1-58-7.png

From the Admin CP:

upload_2014-6-1_1-59-39.png

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:

HTML:
<h3 class="textHeading larger">Title</h3>
 

Andy.N

Well-known member
#3
The titles are done with:

HTML:
<h3 class="textHeading larger">Title</h3>
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?
 

Chris D

XenForo developer
Staff member
#4
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.
 

MattW

Well-known member
#5
Lists don't seem to be displaying correctly by default Chris.

This is the generated code by the editor:
Code:
<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
upload_2014-6-1_9-17-34.png

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

upload_2014-6-1_9-21-51.png

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

Chris D

XenForo developer
Staff member
#6
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.
 

Chris D

XenForo developer
Staff member
#7
I have been too hasty... I think there is a configuration for this which is enabled by default. How bizarre!

Let me test it.
 

Chris D

XenForo developer
Staff member
#8
Chris D updated Redactor Page Editor with a new update entry:

Disables the convertDivs setting

The convertDivs setting is enabled by default. It removes divs and converts them to <p> tags (without retaining any class names you may have applied).

As with normally editing XenForo pages, if you want to use certain HTML functions such as bullets, etc. you will need to wrap your content in <div class="baseHtml"></div>.

That is now retained after saving with this update.

It's also worth noting that I forgot to mention I added a bit of extra JS in the first version that allows you to use...
Read the rest of this update entry...
 

Martok

Well-known member
#9
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. :)

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.
Where in pagenode_container should this be added? I'll probably do the same thing though I'll likely use messageText ugc baseHtml.
 

Chris D

XenForo developer
Staff member
#10
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

Well-known member
#11
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. :)
 

Chris D

XenForo developer
Staff member
#12
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.
 

otto

Well-known member
#17
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. ;)

Regards
 

Chris D

XenForo developer
Staff member
#20
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.