We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Rich Text Editor does not show

How Do I?

vw000's avatar
vw000
482 posts
4 years ago
vw000's avatar vw000

How exactly do I make the RTE field appear in my channel forms template pages?

It appears fine in the control panel, but on my frontend, all I get is a simple text box.

Is there some EE variable I need to use in my HTML text area field, or a specific CSS I need to apply to my template to make it appear?

Running latest EE version 6.1.6

       
Andy McCormick's avatar
Andy McCormick
322 posts
4 years ago
Andy McCormick's avatar Andy McCormick

Can you share your code snippet and screen samples? I see the formatting buttons as expected with the RTE using the following snippet. I tried both CKEDITOR and Redactor.

{exp:channel:form channel="blog" url_title="{segment_3}"}
   {field:blog_content}
  {/exp:channel:form}
       
vw000's avatar
vw000
482 posts
4 years ago
vw000's avatar vw000

Sure. In Slack I was told to use this

{field:my_rte_field_name}

This works! Finally, I see an RTE editor. The RTE loads, but it does with its own HTML and classes in the page. I need to apply my own settings to the text area field.

My text area is the following code right now inside my channel form template page:

<textarea maxlength="5000" rows="8" class="form-control bg-color-primary text-3 h-auto py-2" name="my_rte_field_name" id="my_rte_field_name" required=""></textarea>
       
Rob Allen's avatar
Rob Allen
3,105 posts
4 years ago
Rob Allen's avatar Rob Allen

As you have RTE working do view source and see what ID’s/classes are added to the elements you want to style. Once you have those figured out target some CSS rules for them.

       
vw000's avatar
vw000
482 posts
4 years ago
vw000's avatar vw000

I already tried that, the code that is generated by the {field:my_rte_field_name} seems to be dynamic with ID’s generated on the fly, its a very long code with tons of EE unique settings.

If you just copy that HTML code and try to insert it manually on a template, it will not work.

What I need is to add parameters to the RTE text field. When you use {field:my_rte_field_name} on your template, the RTE box is loaded. Works. But my question would be, how do I add specific parameters to this text area. For example, maxlength=”5000” rows=”8”

Since this is inserted on the fly, I should be passing the parameters somehow.

I had the impression that you just code the textarea field manually and then pass a parameter to it to make it an RTE, this does not seem to be the case but the opposite.

How do I customize the RTE field that is loaded on a template with my own rules?

You load the field on a template {field:my_rte_field_name}

It works. But this code is not anywhere on my template. It’s generated by Expression Engine. How can I make it bigger, or limit the characters, or apply extra rules.

       
vw000's avatar
vw000
482 posts
4 years ago
vw000's avatar vw000

This is how my HTML code looks inside the template and channel form.

Note: ee-custom-field is the RTE field I created in Expression Engine for the channel. This works. I can submit the channel entry from the page fine. What I require is to make this an RTE field because it’s not properly formatting text. It’s a simple box without no formatting.

<div class="row">
    <div class="form-group col">
        <label class="form-label">Message</label>
        <textarea maxlength="5000" rows="8" class="form-control bg-color-primary text-3 h-auto py-2" name="ee-custom-field" id="ee-custom-field" required="" placeholder="Enter message here"></textarea>
    </div>
</div>

If I use {field:ee-custom-field} in the template the RTE text area is loaded. But I have no control on the formatting.

? 1
       
mcfarlandonline's avatar
mcfarlandonline
4 posts
3 years ago
mcfarlandonline's avatar mcfarlandonline

I’ve been running into the same issue with RTE fields. Today I needed to set a maxlength parameter and was finally able to do so via this parameter: https://docs.expressionengine.com/latest/channels/channel-form/overview.html#rulesmy_field_name

However, it’s not an ideal solution. I’d much rather use my own instantaneous inline validation, (that I’m using for other fields), than have the user decipher error messages on the next page.

I ran into this the other day, too, with trying to make an RTE field required.

I know EE has it’s own error_handling=”inline” option, but I’d rather be able to just customize the native RTE form fields than have to make all my other fields match the EE system here.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.