jmzea
  • Member for 8 years
  • Last seen this week
  • Spain
1 answers
4 votes
2k views
Wrapping content in anchor tags with CKEditor
Accepted answer
5 votes

I found a solution. As @Clive said CKEDITOR.dtd.a.h2 = 1; and CKEDITOR.dtd.a.h3 = 1; is the solution. These need to be declared in a my_module.module file: function my_module_editor_js_settings_alter(...

View answer
1 answers
0 votes
69 views
Menu options missing in node form
Accepted answer
0 votes

I found it. Silly me, it was the module Menu link (field), it actually says in the project page The "Menu settings" tab is however removed from the node form and replaced by an field widget. Argh, so ...

View answer
1 answers
-1 votes
492 views
AJAX not working in views for anonymous users
Accepted answer
0 votes

Solved. The problem was that I had a template file for html.html.twig, where the main content was being wrapped in two divs. The problem was that the code <js-bottom-placeholder token="{{ ...

View answer
2 answers
4 votes
2k views
How to make CKeditor format code indenting elements and adding line breaks?
Accepted answer
1 votes

Finally I found a solution, thanks to the post CKEditor with well-formatted html source code. I just added to a custom module the following code: function mymodule_editor_js_settings_alter(array &...

View answer
1 answers
0 votes
46 views
Can't add new language to a Drupal 8 installation
0 votes

Uff, silly me!!! The problem was that the block that shows the link to add a new language was removed from my admin theme. Ok, I hope this helps somebody else with a similar problem too.

View answer
1 answers
1 votes
402 views
What is the parameter $instance_id in the function Block::setVisibilityConfig?
Accepted answer
3 votes

I got it. Example: use Drupal\block\Entity\Block; function mytheme_preprocess_html(&$variables) { $block = Block::load('sitebranding'); $block->setRegion('content'); $visibility =...

View answer
6 answers
10 votes
18k views
How do I programmatically place a block?
5 votes

I found the answer thanks to How to manipulate an Entity:Block programmatically in Drupal 8. use Drupal\block\Entity\Block; $block = Block::load('sitebranding'); $block->setRegion('content'); $...

View answer