Questions tagged [richtext]
119 questions
20
votes
3 answers
Is there a way to output only the first paragraph of a Rich Text field?
I have a rich text output section I want to limit to the first paragraph so I can link to a full version on another page. What's the best way to do this?
Allen Pieper
- 619
- 6
- 11
5
votes
4 answers
Limit text when output richtext
I have a rich text output section I want to limit to specific number of characters or words. So user able preview the blog post and link to the full blog. I try entry.body|slice(0, 100) ~ '...'. But it slice of my html tag and display html code in…
Hs Tung
- 367
- 2
- 12
5
votes
2 answers
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 in the toolbar with a dropdown of categorised…
Mike Vaux
- 480
- 2
- 15
3
votes
3 answers
Smart quotes in rich text fields?
Is there a way to get the rich text field to automatically convert straight quotes to curly (smart) quotes? I'm not seeing anything on the redactorjs site or in the docs.
Shanan Galligan
- 189
- 8
3
votes
2 answers
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 doing such a customizing (like the Redactor…
MISC
- 1,019
- 7
- 17
2
votes
1 answer
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 size of a Rich Text field?
Isaac
- 31
- 3
1
vote
1 answer
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 hours prior to 11.00am
on day of arrival.
…
Ruchira Chamara
- 111
- 1
1
vote
1 answer
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?
analog junkie
- 195
- 8
1
vote
0 answers
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.
Bhashkar Yadav
- 280
- 1
- 8
1
vote
1 answer
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?
Martin
- 1,203
- 8
- 18
1
vote
1 answer
Richtext field removing inserted links
I have a RichText field using a standard config. "Clean up HTML" and "Purify HTML" are OFF.
I have a page with a paragraph of text, then an unordered list. After that list, I try to insert another paragraph and add a line with a mailto link in…
Marc Miller
- 143
- 8
0
votes
2 answers
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 the HTML via the rich text field for the auto…
user2569
- 457
- 2
- 8