Questions tagged [redactor]

An easy to use WYSIWYG editor that is visually light and very flexible.

Filter by
Sorted by
Tagged with
12
votes
3answers
8k views

How do I add custom styles/plugins to the rich text editor in Craft?

I'm aware that I can customise which buttons is available in the rich text editor. But how can I add custom css styles, either as classes or as inline styles? Do I need to create a plugin for this? If ...
11
votes
1answer
700 views

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

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 ...
9
votes
1answer
959 views

Table button missing in Rich Text fields?

I updated to Craft 2.3 and noticed that the Table button is now missing from my Rich Text fields? How can I get that button back?
7
votes
5answers
9k views

Stop Redactor adding paragraph tags

I'm using a Rich Text field for captions beneath images, so that I can add bold, italic and links. But I'd like the output HTML to be a single line; ie, no block-level tags like <p>, or line ...
7
votes
2answers
1k views

Can I change which 'Format' options are available in my Rich Text field?

I want to update my Rich Text field so only H1, H2 and H3 are the available options in the 'Format' selector. Is this possible?
7
votes
2answers
1k views

Is Redactor's default config saved as a .json file anywhere?

When I need to make one tiny change to the default config it would be handy to be able to duplicate the current default.json file and just change a one thing instead of building a duplicate from ...
7
votes
1answer
3k views

Redactor table plugin for craft

Okay so my question is simple. Is there a craft plugin that lets me add tables in my redactor fields? If not then is there a way I can add the table.js to the redactor plugin config. I add ti but it ...
7
votes
3answers
2k views

How do I prevent Redactor from wrapping <img> with <p />

I'm looking to have the <img> inserted without the wrapping <p />. I'm assuming I can tie in to one of the callback functions to do this? There is a fileUploadCallback function available ...
7
votes
1answer
460 views

Remove outdent & indent from Redactor2 "lists" button

Redactor 2 introduced a single "lists" option for ordered and unordered lists but unfortunately this adds the outdent and indent options in as well. Any way of removing outdent/indent again?
6
votes
5answers
2k views

Rich-Text/Redactor hyperlink classes

I’m trying to implement different hyperlink styles within a rich-text field by adding formatting options via a Redactor config file. "formattingAdd": [ { "title": "Button", "tag": "a", "...
6
votes
3answers
858 views

Change font of Redactor II

How do I change the default font (Trebuchet) of Redactor II to Arial, for instance? I don't know how to override the default CSS of Redactor. Please help. Tnx in advance!
6
votes
1answer
3k views

How can I link to an Asset from the Rich Text editor?

I have some content on my entry like this: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis rutrum dolor. I know I can link to an Entry or Category, but I would like to link to ...
6
votes
3answers
925 views

apply transform to image uploaded into Redactor?

Is it possible to allow the selection of an image transform on an image that's been uploaded into a Redactor field?
6
votes
3answers
3k views

How do I enable redactor rich text editor in a front-end form?

I have a front-end form for registered users to submit entries, however I'd like to have a WYSIWYG editor like the dashboard. How would I get redactor working with this form? My form: <form ...
6
votes
3answers
5k views

How do I add class to redactor format list?

I understand that to add a "note" class to the redactor text editor drop down, I need to use formattingAdd. But each iteration I've tried does not work. The example is: https://imperavi.com/redactor/...
6
votes
3answers
920 views

How to append 'Continue reading…' link within the last paragraph of the Excerpt

The code from the RichText documentation appends the 'Continue reading…' link in a new block and on a new line: {% for entry in craft.entries.section('blog') %} <a href="{{ entry.url }}"&...
6
votes
2answers
2k views

How to remove empty tags in rich text? (Redactor or Twig)

What is the preferred method to remove an empty tag from the content of a rich text element? Example result: <p> Lorem<a href="…"></a> ipsum </p> When editing text in the ...
6
votes
1answer
507 views

Extra spaces appearing in Rich Text fields after 2.5 update

In addition to the inability to resize images in the rich text fields (mentioned elsewhere), I'm having issues with rich text fields, particularly in Matrix blocks, inserting extra spaces between ...
6
votes
1answer
407 views

Any workarounds for image resizing in Craft 2.5 Redactor II?

Since imageResizable was deprecated for some apparent reason which I have no idea why they would do that. Does anyone know of a workaround or a plugin/config setting to enable this again?
5
votes
3answers
3k views

Redactor 2 - Can a text alignment button be added?

Left, Center, Right -- Can the text alignment button be added to Redactor 2, and if so, how?
5
votes
2answers
2k views

HTML/View Source button not working/showing in WYSIWYG Craft 2.5 / Redactor II 1.1.0

The "HTML" button no longer seems to show in the WYSIWYG. The button is set in the Redactor config file like so: { "buttons": ["html","formatting","bold","italic","unorderedlist","orderedlist","...
5
votes
2answers
2k views

Image alignment and size in Redactor 2

Redactor I had a feature that allowed editing of image alignment (via the image popup) and size (by dragging the square bounding box), is it possible to enable this functionality in Redactor II? Is ...
5
votes
3answers
1k views

Adding class to images in rich text

How can I add a CSS class to all images inserted into a rich text field ? ie. so an image inserted has style= "image fit" added to the img selector
5
votes
2answers
1k views

Wrap embeds with HTML in rich text field

When using rich text fields, is there a way to automatically wrap embedded content (specifically, videos) in some kind of custom HTML? I'd like to, at the very least, wrap the embed in some element (...
5
votes
1answer
704 views

"Excerpt" option in Redactor?

I love using the excerpt option in Wygwam (CKEditor). I've looked high and low but as of yet, have been unable to find a way to have an exceprt show short of having a whole second field. I have seen a ...
5
votes
2answers
2k views

How to link to an anchor on an entry page from within Rich Text editor

I need to link to a particular #anchor on a page from within the WYSIWYG editor. However, if I start by using Link to Entry in the Rich Text editor, Redactor adds its own 'anchor' (with the same ...
5
votes
1answer
733 views

Preserving <p> tags inside a <blockquote> tag in a Redactor rich text field

If I have multiple paragraphs of text in a rich text field, and I select them all and select "Quote" from the formatting menu, the <p> tags are stripped out and replaced with double <br> ...
4
votes
1answer
1k views

Craft 3 Redactor Link no longer has target option

The option for opening a link in the Redactor WYSIWYG no longer includes a field for opening it in a new tab? I haven't been able to find any docs that indicate any options for the Redactor config ...
4
votes
1answer
2k views

Redactor video plugin not working

I've tried to integrate the video.js plugin for Redactor. It allows me to insert a YouTube embed (as expected) but the iframe code is stripped out on save. Using the latest Craft 2.5 build. Anyone ...
4
votes
3answers
3k views

Redactor stripping script/html tags

I wasn't to allow a user to enter html into the Rich Text field. The html in question is: <div class="issuuembed" style="width: 525px; height: 525px;" data-configid="7563847/30149275"></...
4
votes
2answers
389 views

Redactor Single Line Mode

Is it possible to configure redactor so it will only accept a single line of text and not wrap it's content in a paragraph tag? Essentially, I'm looking to allow an editor to submit some formatted ...
4
votes
3answers
4k views

HTML being stripped/replaced by redactor on initialising despite being saved correctly

When i enter HTML into redactor below it will strip out the first closing div and the second opening div leaving one col-md-6. It actually saves it as I have below but as soon as redactor is re-...
4
votes
2answers
2k views

Custom redactor.css file

I would like to override or include a custom redactor.css file so that I can match the typography of the rich text editor contents with the site's stylesheet. The path to redactor.css is hard-coded ...
4
votes
2answers
969 views

Dragging images inside of rich text editor [closed]

On Redactor's website, they provide a demo with an image that you can click on and drag around the editor to relocate it among the text. Video example from Redactor's website Trying this same ...
4
votes
2answers
598 views

What is the future for the Craft rich text editor?

I can (almost) appreciate the recent impositions of Redactor 2, but when it comes to handing off the site to a client, Redactor 2 is virtually unusable for anything more than paragraph text. Are ...
4
votes
3answers
1k views

How can I use <small> <sub> <sub> within a redactor/rich-text field?

We need to be able to add super and sub-text to a rich text field without having the client dive into the markup. Has anyone successfully added this as a redactor or Craft plugin?
4
votes
2answers
3k views

Rich text field adding &nbsp; and normal space char at random

Is there any rhyme or reason to the adding of non-breaking spaces or traditional space? It seems to appear at random throughout the content in my rich text fields.
4
votes
3answers
485 views

Ugly Redactor II and how to fix it with some CSS

Redactor II uses Trebuchet as font, has ugly paddings, giant font sizes and other things. This must be fixed...
4
votes
2answers
680 views

How to add Redactor Image resizing and positioning to the Rich Text field in Craft?

Can anyone provide details on how to add Redactor (II) Image resizing and positioning to the Rich Text field in Craft? Many thanks!
4
votes
1answer
795 views

Redactor image caption not saved and formatting lost

In Craft CMS 2.6.2945, I've added the "image" button in the Redactor config. In the editor, I've added an image and added a caption (by clicking the inserted image). When the image is saved, the ...
4
votes
1answer
1k views

YouTube video embeds in rich text field not saving

When adding a YouTube video to a rich text field the video embed appears as expected. The entry then fails to save with no error (if I make other changes at the same time they don't save either). ...
4
votes
1answer
873 views

Redactor II Craft 2.5 Prevent Paragraphs

I realize Craft 2.5 ships with Redactor II which has many changes. With Redactor I a combination of paragraphize: false, replaceDivs: false, linebreaks: true, enterKey: false kept text from being ...
4
votes
2answers
1k views

Can images embedded in a Rich Text field be resized on output?

I see how to use Image Transforms when the image tag is its own field but don't see a way to handle images within Rich Text fields or force a size on upload. I need to have the image dimensions ...
4
votes
1answer
539 views

Redactor I icons missing

As you can see from the image below, the icons are missing from redactor I. Has anybody else had this issue? Running dev tools in chrome shows no errors. Bold, for example has the following css ...
4
votes
1answer
140 views

Is there an option to edit title-parameter for Links in Redactor?

How can i edit Link-Title in Redactor Richtext-Editor? Didn't found any config options or plugins for that. Can't believe this is not possible yet.
3
votes
2answers
4k views

Where do I add custom css for the Redactor editor in the Craft control panel?

Redactor provides a way to specify custom styles for content in the editor. It's documented here: http://imperavi.com/redactor/examples/typography/ How can I use this approach with Craft? I've ...
3
votes
1answer
521 views

Does Redactor have a button that adds a horizontal rule (<hr> tag)?

Does Redactor have a setting for a button that adds a <hr> tag?
3
votes
1answer
304 views

On entry save/update, centered text returns to left in rich text field

How am I to center text with in the rich text field type? It centers while I'm editing, then returns to left align on save (and on output). I feel like I'm missing something obvious here...
3
votes
1answer
4k views

Rich text editor Redactor adding additional paragraph p tags

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? ...
3
votes
2answers
2k views

Redactor Images Button Missing

I am currently using the Standard JSON configuration. My config is below. I cannot get the image button to show up for my Body Field/Rich Text. This is the same configuration I've used on other ...

1
2 3 4 5 6