1

How can I add a button to CKEditor so users can use read/show more in their editor. This would help me a lot. I have looked in a lot of places, but no succes. I am no programmer, so I'm not familiar with drupal/php code.

6
  • Do you know how to use views May 27, 2015 at 10:07
  • I don't quite see how views can help since views is not in ckeditor? And my users don't have rights to work with views. May 27, 2015 at 10:25
  • I mean you could use views to build display page for that content and views will help adding more link. May 27, 2015 at 10:53
  • Hmm, is a solution but I would prefer something within the CKEditor itself. Not much information about that on the internet. May 27, 2015 at 11:03
  • It could be done using some UI coding css+javascript May 27, 2015 at 11:06

2 Answers 2

0

You should use the Collapse Text Module and here is a good description how to install it.

And there is already a CKEditor Plugin for this module as well.

1

I don't think this is possible within CKEditor and even if it's possible you need to make sure that your theme understands the tags inserted by CKEditor which is not always the case.

This is because when the text content is displayed on the theme layer CKEditor is not involved at all at that point and Drupal, the Text Formats you define, views if configured, and the theme layer take care of displaying the text.

Possible solution: by default Drupal gives you the body text as "Long text and summary" with the widget "Text area with a summary" and hence your editors, by default, can click on "Edit Summary" on top of the editor to input summary text. I highly recommend you stick to inputting the summary text here and then the "read more" text in the body as most themes and views use that functionality by default. Some don't, but I see this as standard most of the places.

Good luck.

3
  • Wordpress has such a CKEditor feature.
    – Jurik
    Jul 29, 2015 at 9:09
  • Doesn't WordPress use TinyMCE as their editor? In all cases, read my answer as I explain why you might be better off with another solution even if TinyMCE and CKEditor support the feature. Cheers.
    – Mario Awad
    Jul 29, 2015 at 12:01
  • Yeah, I know - that's why drupal has a module named collapse text.
    – Jurik
    Jul 29, 2015 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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