Take the 2-minute tour ×
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It's 100% free, no registration required.

I am looking to control what asset directories are available from the image upload button in a rich text field. Is this possible?

Also, does anyone know the Redactor setting to set the default size of the editor? I can't seem to track it down.

Thanks!

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Is there a way to limit the Asset upload directory in Redactor?

No. You'll want to use a Matrix Field with an image block.

That said, it's possible you could create a Redactor button that does this via a plugin, but it'd probably be a bit of work.

Does anyone know the Redactor setting to set the default size of the editor?

The setting your looking for is minHeight. Here's an example:

{
    buttons: ['html','formatting','bold','italic','unorderedlist','orderedlist','link','image','video'],
    plugins: ['fullscreen', 'pagebreak'],
    minHeight: 200
}

A longer discussion on custom Redactor toolbars and a few more examples can be found in this article: Custom Redactor Toolbars for the Rich Text Field in Craft CMS

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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