RTE Text Component - plaintext | Community
Skip to main content
James_R_Green
Level 6
Nov 28, 2018 4:22 PM UTC
Solved

RTE Text Component - plaintext

Hi,

Is there a way to make an text/RTE component store plain text as opposed to HTML?

I realise that this is a strange question given it would make the rich text features such as bold and italic completely useless!

I want the author experience of the RTE editor and want to be able to add custom plugins but the result should be plaintext.

Alternatively is there an example of a customizable text editor in a dialog that allows for plugins/custom functionality that can store in plain text?

Thanks,

Jim

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Nov 28, 2018 7:04 PM UTC

Not sure why you want to add plain text using Rich Text Editor.

If you want to add plain text you can go for Textarea — Granite UI 1.0 documentation

Or in RTE without p tag then you can add removeSingleParagraphContainer :true It will only remove first p tag.

Or If you need to show RTE HTML tag instead of rendered RTE then don't use @ context='html' in HTL.

You can also try to create hidden field. where you can read RTE from RichText as plain text using jQuery and as plain text in hidden field.

Arun Patidar

1 reply

arunpatidar
arunpatidarAccepted solution
New Participant
Nov 28, 2018 7:04 PM UTC

Not sure why you want to add plain text using Rich Text Editor.

If you want to add plain text you can go for Textarea — Granite UI 1.0 documentation

Or in RTE without p tag then you can add removeSingleParagraphContainer :true It will only remove first p tag.

Or If you need to show RTE HTML tag instead of rendered RTE then don't use @ context='html' in HTL.

You can also try to create hidden field. where you can read RTE from RichText as plain text using jQuery and as plain text in hidden field.

Translate
Arun Patidar