Questions tagged [richtext]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
27 views

Redactor or another HTML editor that can inherit actual page styles?

is it possible for Redactor or any of the other editors to actually inherit the styles from the (front end) page it is editing? My client has bootstrap columns etc and the pages have some elements ...
1
vote
1answer
244 views

Craft 3 Upgrade having issues with rich text editor

I know that Craft3 now requires Redactor or CKEditor plugins to handle rich text editing, however after installing the Redactor plugin through the store, I am getting this error in the 'Body'. The ...
1
vote
1answer
186 views

striptags but leave link test in between

I have a rich text (redactor field) that I'm using striptags on to remove the html markup from the front end. However I noticed for links it whips out the link and the text in between. Is this ...
1
vote
2answers
151 views

How can I get the image picker on the WYSIWYG editor?

I am running on the latest version of Craft (Craft CMS 2.6.3015). I have a blog entry, which has a Rich Text editor for the body field. However, I do not have an image or file upload field in the ...
1
vote
1answer
44 views

Getting properties out from the Craft text object

I got this kind of object. Craft\RichTextData Object ( [_pages:Craft\RichTextData:private] => [_rawContent:Craft\RichTextData:private] => Standard Rate: Cancellation policy is 24 ...
2
votes
1answer
483 views

How to add a button or format style in Craft 3 CKEditor (rich text field)

I'm looking to customize the CKEditor (rich text field) to restrict my client to only these buttons: h2, p, bold, italic, underline, link & unordered list.
0
votes
1answer
139 views

How to output a Rich Text Link to an Entry as a tooltip?

I have a Glossary channel on my site, with Term and Definition fields. I would like Terms to display their definitions throughout the site...whenever so assigned by the content editor. I currently ...
1
vote
1answer
52 views

Font family choice in rich text

Is there a way to choose the font family in rich text field? I want to have the option to choose from 2 or 3 font families in the rich text field. Is that possible in craft?
1
vote
1answer
72 views

How can I reference images in a rich text field?

I need to reference an image in a rich text field separately to the text. So I can't just use {{entry.body}} I need to be able to do {{entry.body.image}} or something comparable. How can I do ...
1
vote
1answer
42 views

How can I reference images separately within a rich text field?

I'm migrating some posts from Wordpress, and the posts on Wordpress have the images within a rich text field. I need to reference the image separately to the rest of the rich text field - below the ...
1
vote
0answers
29 views

_entry.twig in sub folder, rich text editor images using relative URL and are therefore not found

This may be something obvious that I'm missing, but how can I make craft use absolute URLs for images add to rich text editor fields? Or use the {{siteUrl}} prior to the image src URL in order to fix ...
1
vote
0answers
19 views

Rich Text field is stripping anchor while showing the content

I am facing a strange issue. All the anchors are getting stripped while publishing the content of Rich Text field. Could anyone please help me.
0
votes
1answer
90 views

Disable “dynamic links” in rich text fields

When we're adding a "link > link to an entry" to a rich text field, this will result in a link to https://www.site.com/page#entry:3962:url and we understand what the purpose is of this additional #...
1
vote
1answer
294 views

Adding link type to Redactor Rich Editor

I have a Craft CMS powered site which has "Suppliers" set up as a user group. A route is being used to link through to these suppliers on the frontend; example.com/supplier/loremipsum. Is it possible ...
2
votes
1answer
321 views

Force redactor to only display HTML editor view

Is there a way to make a Rich Text field using Redactor, to only display and allow input in the HTML view? The first step I tried was making a redactor config file that looks like this: { "...
2
votes
1answer
41 views

Can you increase the max size of Rich Text fields?

I'm unable to save an entry, and I'm getting an error saying that a Rich Text field is too long. If I disable the entry, it saves fine, but when it's enabled, it doesn't save. Can I increase the max ...
1
vote
1answer
78 views

Can I call a filter on all Rich Text fields?

I'm looking to dynamically replace the ℠ glyph with <sup>SM</sup> in all rich text fields, since that glyph doesn't exist in the font we're using. I'd like to avoid having to call the |...
2
votes
1answer
844 views

Text Align Buttons for Rich Text Fields

I'm trying to add the ability to be able to align text left, right and center to my rich text fields. I have had a look into it and can only find a version which works perfect for body fields but not ...
1
vote
1answer
182 views

Check for an image in Rich Text Field

I have a DIV wrapping a Rich Text field. I would like to add a class name to the DIV only if an image is present in the text field. Is there a way to check for an image?
0
votes
1answer
249 views

How to limit RTF field word count?

It is easy to set in the text field, but I don't see such option in RTF. How can I do it? Alternatively, I can use a text field, though it doesn't output new lines as paragraphs - it is possible?
1
vote
1answer
513 views

Redactor can't add image into toolbar

In my rich text field I want to add images to the toolbar. I have done everything that has to be done: I've added "image" to the Standar.json file and selected the Standard.json to be used for the ...
0
votes
2answers
86 views

Over ride auto-generated alt tag on image added via Rich Text field

When I add an image via a rich text (doing as port of a flexi layout approach) somehow an alt tag gets auto output, e.g: alt="sketch2.jpg#asset:308 I wondered if there is a way to over ride or edit ...
2
votes
1answer
485 views

“Purify HTML” on plain text fields

Recently we've had someone/something trying to perform a XSS attack using a form which saves all data into sessionStorage and then sends it to a custom craft plugin to pair it with a user. A solution ...
1
vote
1answer
902 views

How can I change the rich-text editor to remove the “Heading 1” option

I want to remove the option to add a H1 from the dropdown in the Redactor rich-text component. I have edited the Standard.json file in craft>config>redactor to the below but it still hasn't done the ...
3
votes
3answers
243 views

How to remove Link To Category from Redactor

Is there a way to remove the 2 Craft specific menu items from Redactor's Link menu without losing access to the "Insert link" menu item? Removing the Link button in the redactor configs is too ...
0
votes
1answer
86 views

Strip styles option in Rich Text field?

Is there a way to add a button to remove the current styles inside of a Rich Text field? I know there are options for customizing the toolbar, but I haven't found anything about removing styles. Any ...
3
votes
2answers
2k views

Removing P tag's in rich text area's

Before you think this has already been answered, yes it is but I can't manage to get that fix working so I'm looking for another one. I have a "title" field in a couple of my matrix blocks but my ...
1
vote
1answer
482 views

Rich Text field is producing weird space character instead of &nbsp;

Example from the frontend Example in dev tools If I "view-source" on the page Example from Rich Text Field Example from Rich Text Field HTML This is a Rich Text field within a matrix, it's output ...
0
votes
1answer
98 views

Richtext Redactor Field - Standard Layout does not show image button

When i use a "Default" Richtext field - the image button displays and works. When i change Default to "Standard" (the out of the box one) the image button does not display. All instructions suggest ...
5
votes
1answer
682 views

Emojis in Rich Text Field

Does anyone know of a good way of handling emojis in a rich text field? I'm aware that is possible to copy and paste them into one, but does anything along the lines of an emoji 'button' (i.e. to sit ...
3
votes
1answer
134 views

How can I dynamically remove some unwanted formatting tags inside rich text fields?

I set up a Redactor config to add h3 headings only. If I copy-paste texts from a text edition software like Microsoft Word and uses h1 or h2 for example in his document, these un-wanted headings will ...
3
votes
2answers
1k views

How to customize HTML Purifier?

HTML Purifier is deleting a custom link attribute. As I understand the HTML Purifier docs, it should be possible to customize it to allow a defined attribute. Is there in Craft CMS a defined way for ...
1
vote
2answers
330 views

Automatically link to entries in rich text field

Has anyone implemented auto linking of words within a redactor field? For example, a rich text field would contain this: ​A small boat surrounds a large ​island​​ In a channel there are entries ...
1
vote
0answers
87 views

How may I restrict uploads to a single folder with variables within a Rich Text Field?

Craft's Asset Fields allow you to restrict uploads to a single folder—and even pass through a variable to create a dynamic path. How may I restrict uploads to a single folder with variables like this ...
3
votes
1answer
299 views

Using the Redactor rich text field, how can I dynamically wrap my images with a fancyBox link (with attributes as parameters)?

I'm using fancyBox (from fancyApps, http://fancyapps.com/fancybox/), and I need to wrap my images added within the Redactor rich text field with a link that had an href to the image source + some ...
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). ...
0
votes
1answer
683 views

Redactor adding extra paragraph and br tag when entering and exiting HTML source mode [closed]

I'm currently on the latest version of Craft (2.6.2785). When I edit Redactor content I have no issues, but if I enter HTML mode and exit it I end up with <p><br></p> prepended to ...
0
votes
2answers
147 views

Add fields to image popup

Is it possible to add additional fields to the image popup in redactor? In addition to Title, Caption and Link.
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 ...
0
votes
1answer
161 views

Remove/stop 'redactor-inline-converted'

Not specifically a Craft problem but I'm struggling to find an answer from Redactors site. I've got over 100 occurrences of class="redactor-inline-converted" littered throughout the markup of Rich ...
1
vote
1answer
141 views

How to append / prepend into a rich text field

I have a rich text field, e.g. for defining an image caption. Now in my template I would like to prepend some text to the content of the rich text field, e.g. Figure 1: [rich text]. Is this possible? ...
1
vote
1answer
167 views

Filter rules as a variables

I want to strip every headline tag from all Rich Text fields site-wide. So I thought about adding a replace filter. But since this will be site wide I wanted to write the replace rules in a variable:...
0
votes
1answer
109 views

Corruption of Link to an Entry links within Rich Text field

On a local government website running Craft CMS a lot of in-body links are effected with the Link to an Entry function within the Redactor editor. I have encouraged the content editors to use this ...
0
votes
1answer
200 views

Rich Text Field mailto Option

Wondering if there is anything (plugin or otherwise) I can put into my Redactor json file that will generate a mailto option in the insert link dropdown? I can’t seem to find anything on the subject.
2
votes
2answers
534 views

Redactor deleting <b> <i> and other inline markup

I'm running the latest version of Craft Craft Pro 2.5.2760 I've tried this on a vanilla install and on a current site where the issue was highlighted initially. If I copy and paste "this is some ...
0
votes
1answer
87 views

Rich Text field won't accept link

I am unable to insert a link into a Rich Text field. The modal opens, I enter the data but nothing happens when I click ‘save’, no errors seem to be thrown. I am able to insert a link to anther ...
1
vote
3answers
519 views

How do you prevent white space from being removed after line breaks within a Rich Text Field?

I am utilizing a CSS class within headlines for responsive line breaks. This class shows the line break for large displays and hides the break for small displays. Using the HTML/Source button within ...
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?
1
vote
1answer
322 views

Treat links in redactor/rich text field differently depending on entry type

I'm looking for a way to handle links to entries in a Redactor (Rich text) field such that a different class gets added to the <a> tag depending on the type of the entry. For example, a link to ...
3
votes
1answer
136 views

Pasting tables from Microsoft Word into Rich Text fields

How do you paste a table created in Microsoft Word into a Rich Text field in Craft?