Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Anonymous (not verified)
Created:
16 Feb 2015 at 08:56 UTC
Updated:
15 Feb 2026 at 08:06 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
Anonymous (not verified) commentedThe class name was incorrect. JavaScript was not able to show the selected guideline.
There was a funy situation. Renderer set #access to false, so few guidelines were not rendered.
I added a prefix. It works well.
Added test cases to check if guidelines were rendered.
Also moved filter twig templates from classy theme to the module to make the site and tests working the same.
The idea has been born: Let's move renderer items instead the twig templates he in the filter module. It will look more simple and standart.
Comment #3
Anonymous (not verified) commentedBecause templates were copiedd to the module folder, extra classes appeared.
Comment #4
idebr commentedThe additional classes were removed in #2349677: Copy filter templates to Classy
Comment #5
Anonymous (not verified) commented@idebr Yes, I saw the issue. It seems I do not understand the purpose of the theme classy. I see that theme - bartik reuses the classy. Tests use module templates. So I copied templates from classy to the module and corrected tests. Advise me how to correct templates right to make tests workable.
Comment #6
idebr commentedThe formatting guidelines were purposefully removed in #2098071: Disable filter guidelines for a text format if that text format has a text editor enabled. The reasoning is that elements that a user can add through the text editor match the allowed elements.
This leaves us with the issue where the guidelines are currently now shown for text fields without a WYSIWYG, such as Restricted HTML.
This is the only change required in this patch.
Classy was added to Drupal core to give themers the ability to opt-out of classes included by core. For more information have a look at the wiki: https://www.drupal.org/theme-guide/8/classy or the change notice: https://www.drupal.org/node/2337467
Comment #7
idebr commentedUpdated the issue summary to clarify the problem and proposed resolution.
Comment #8
Anonymous (not verified) commentedThere is an idea to move "guidelines" from templates to renderable array. It will look more clear and common.
Comment #9
prateekMehta commentedUsed approach mentioned in #6,
Comment #10
prateekMehta commentedComment #11
idebr commentedThanks @prateekMehta for picking this up! I did a manual test to confirm the formatting guidelines are shown correctly for textareas without a WYSIWYG editor:
Before patch:
After patch:
Comment #13
idebr commentedReroll after #2349559: [meta] Discuss the organization of subfolders in Classy was committed.
Comment #14
Shivam Agarwal commentedUsing patch mentioned in comment #13, problem resolved in D8 UI. After applying patch guidelines for formatting is available in textarea. Attached images are screenshots of UI before and after applying patch.
Comment #15
Shivam Agarwal commentedPatch same as mentioned in comment #13. This patch is added here just for learning purpose. I am not the author of this patch.
Thanks
Comment #16
wim leersYet another case where front-end tests would've helped.
#15: You've reuploaded an identical patch. That's not cool. Please don't do that again.
Comment #17
Shivam Agarwal commented#16 Yes I have done that intentionally for learning purpose and that's why I have mentioned the reference from where it has been taken and said that I am not the author. In any way I have not claimed or tried to own this patch. Sorry if still this is wrong.
Comment #18
alexpottCommitted 2a4f4d2 and pushed to 8.0.x. Thanks!
Given #15 was uploaded for "learning purpose" I have not credited @Shivam Agarwal on the commit message.