Hello Drupal masters !

I have a content type with a "Text (formated)" field. When I try to write something in it, all my HTML is ok. But I want to use the buttons of ckEditor to make it more "user friendly". I don't want to always have to write all my tags manually.

On "Text, long (formated)" field, there is no problem.

You can see what I mean in this print screen :

My problem illustrated

For your information, I already tried to switch text format under my field. Nothing change except I got more tags allowed.

Thanks for your help !

  • Are you sure that is a text formatted long and not just text formatted? – Kevin Feb 1 '18 at 17:17
  • That's not a long text and that's the problem. I don't want to use a long text field for just a 2 word's phrase. But I will use it if it's not possible to use ckeditor on in formatted textfield :) Thanks for your comment. – Lucas.S Feb 2 '18 at 13:14

CKEditor only works on a textarea, you can’t attach an instance to a textfield.

You could implement hook_form_alter and change it from a textfield, but it’s hard to see what the point would be.

If you need long text, just use a long text field. It was designed for your use case, so will always work as expected.

  • I mark your reponse as the answer. Thanks for the information. I don't want to use a long text for just 2 words (it's a page title, like : "About this work" where work is bold for exemple.) But it looks that's not possible to do what I want simply. I will use a long text field so. Thanks :) – Lucas.S Feb 2 '18 at 13:16
  • The "Text (formated)" field might be removed in the future: drupal.org/project/drupal/issues/2737499 – Pasqualle Sep 24 '18 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.