Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wysiwyg]

Use it for questions about the WYSIWYG editors made available in Drupal.

0
votes
0answers
20 views

CKEditor toolbar missing when conditional field becomes visible

I use the D8 Conditional Fields module to make a CKEditor field (author bio) invisible until there is something in another field (author). When I type something in the author field, the author bio ...
3
votes
1answer
61 views

drupal_render() is deprecated. What replaces it?

I have a render array and I want to convert it to HTML and place it in a WYSIWYG field. What is the generally accepted way to do that since drupal_render() is deprecated?
0
votes
1answer
31 views

How do I include an affiliate script?

I am trying to add an affiliate script to my Drupal 7 website. I am doing this in a custom block. Specifically, I create a block, select the scripts text format in my WYSIWYG Editor, add the script ...
0
votes
1answer
26 views

Cannot apply my custom styles to HTML tags in ckeditor

I'm using Drupal 8 and am trying to make ckeditor truly wysiwyg. To that end I've successfully gotten ckeditor to use a custom stylesheet by adding a ckeditor_sylesheets key to my theme's info.yml ...
0
votes
2answers
36 views

How to reformat HTML output of format?

I have looked for days and cannot find an example of what I need to do. I wish to reformat the HTML output ckeditor uses for blockquote. CKEditor output for quote: <blockquote><p>...
0
votes
1answer
43 views

How to add css class on click of CKeditor table button?

We are using the CKEditor module provided from Drupal 8 (v8.6.2). There is a need to add a css class to the table when it is added to the Body field (text formatted, long) after someone clicks on the ...
0
votes
0answers
29 views

CKEditor Filter does not persist text after modifying

I wrote a filter class that strips out certain tags from the user input in the editor. For example it uses a regular expression to remove <span> tags of a certain class. The steps I took were: ...
2
votes
0answers
29 views

Conditional loading of CKEditor plugins [closed]

I have written two widgets used on a form, now I have to write a plugin to be loaded in a view with editable content. These plugins should not mix: the buttons shown in the first two make no sense on ...
0
votes
0answers
17 views

How to token Insert nth element of Iframe?

Module used: Token Insert I have a content type with an iframe field which accepts multiple values. In my wysiwyg body field, I did a token insert. When I add this iframe field which has only one ...
1
vote
1answer
147 views

How do I add the ability to change font size in CKEditor?

I'm trying to install the CKEditor Font Size Module in my my editor. I installed the module via composer and then proceeded to copy the font/plugin.js file from the Font Plugin's page into libraries/ ...
-1
votes
1answer
26 views

How do I enable title and target to link?

Using Drupal 8, with the link icon in the wysiwyg editor, currently in the modal popup, it only allows URL. I have to switch to source to add title and target attributes (outside website). Is ...
0
votes
1answer
153 views

How do I add a CSS class to a p tag in CKEditor?

The standard center button only applies a in-line style to the HTML. But how can I add a class 'text-center' to a paragraph or selection by clicking the following icon? I went ahead and created a ...
1
vote
1answer
75 views

What's the correct way to pass variables to the JavaScript of a custom CKEditor plugin?

I saw that we can pass values to our JavaScript using drupalSettings. However, this is for Drupal custom module JavaScript files. Since a CKEditor plugin file is already attached/loaded in a different ...
1
vote
0answers
212 views

How to fix “Cannot read property 'icons' of null” error?

First of all, I'd like to mention this answer is not related, I'm using Drupal 8.6.1. I'm trying to create a CKEditor plugin with a new button. In the /admin/config/content page I get the error but ...
0
votes
0answers
24 views

apply several items of styles dropdown to element in ckeditor

i would like to apply three classes (panel class, direction, color) to one element. i know one way is to define those classes in dropdown styles and apply those styles for that element but it seems ...
0
votes
1answer
139 views

How do I update the CKEditor text widget using CKEditor API

I am using Drupal 8's Ajax API to update form fields in a form depending on the input in another field. One of the fields I want to update is a text_format field that uses Drupal's ckeditor. If I ...
0
votes
1answer
267 views

Add class to any element with CKEditor

Is there a way to add class to any element through CKEditor? Here is an example: I create a list with CKEditor and I want to add a class to the ul tag. Or maybe on one of the li. Everything without ...
0
votes
1answer
179 views

CKEditor oEmbed Plugin Shows up in config but not in actual Editor instance

The issue I'm having is very similar to this question, but the solutions here did not work for me. The steps I took: Downloaded the latest version of the oEmbed plugin from https://ckeditor.com/...
1
vote
1answer
232 views

How can I disable image resizing in CKEditor?

Our site is responsive and when editors use the resizing handles after uploading an image into the editor, it puts in fixed width and height on the image. We don't want them resizing images at all, ...
0
votes
0answers
50 views

HTML Purifier Ckeditor accordions shortcode is blocked

I am using Drupal 8.5.7 and HTML Purifier 8.x-1.0-rc1. And also using Ckeditor Shortcodes. HTML Purifier is blocking the [accordions] shortcode. I'm sure its a setting in /admin/config/content/...
1
vote
1answer
73 views

WYSIWYG CKEditor is altering source text on reload. Why?

I created a paragraph with a text field that uses CKEditor text editor with Full HTML enabled. I switched to the Source view and pasted the following code into CKEditor. <!doctype html><html ...
0
votes
1answer
45 views

Link to content within node, from CKEditor WYSIWYG

This seems like it should be fairly simple, but I'm having trouble getting off the ground. I have a content type "Document". This content type has a field of type File, which allows for uploading PDF'...
1
vote
1answer
237 views

Capturing keyup event (JavaScript) from Drupal editors (CKeditor)

I maintain the Textfield Counter module. An issue was raised that the module does not work for textareas with CKEditor enabled. I need to catch a keyup event from editors, or even just the CKEditor ...
1
vote
0answers
1k views

How do I practically use the media library?

Now that Drupal 8.6 is released, I tried the experimental Media Library module. It works great, but it needs some additions. How can I use core Media Library with CKeditor? How can I fill custom ...
0
votes
1answer
76 views

Add fields to image upload option in CKEditor

I make SVGs using LaTeX and would like to upload both the image and its LaTeX source code when I attach an imagine via CKEditor. I don't want the code to be displayed, just stored with the image so ...
0
votes
1answer
104 views

HTML Purifier module and upload YouTube videos not working

I am using the HTML Purifier module https://www.drupal.org/project/htmlpurifier. And Drupal version 8.5.6. Most of the help I could find is for Drupal version 7. When I try to embed a YouTube video ...
1
vote
0answers
343 views

How can I add classes to images added in CKEditor via Media?

Similar question to How to set width to Media entity image in CKEditor BUT I am trying to do more than insert various sizes of images, I want to add classes to the actual img tag. So when I insert an ...
1
vote
1answer
158 views

Open inline link in modal/colorbox

I have the colorbox module installed so I assume there's a way to do this with it, but I've had no success. Pretty much what I'd like to do within the WYSIWYG editor is have a link to an external ...
-3
votes
1answer
270 views

How to add advanced CKEditor dialog tab for iframe?

<?php namespace Drupal\custom_ckeditor\Plugin\CKEditorPlugin; use Drupal\editor\Entity\Editor; use Drupal\ckeditor\CKEditorPluginBase; /** * Defines the "dialogadvtab" plugin. * * @...
1
vote
1answer
143 views

hook_editor_js_settings_alter()

I am using hook_editor_js_settings_alter() to disallow HTML tags in Ckeditor. It is only working in node edit form, and Ckeditor is in edit mode. Wen I preview the published page it allows the tags in ...
0
votes
0answers
25 views

WYSIWYG editor not showing result of custom form backend

I've created a module. In this module, I've created a custom form with some parameters. In theses parameters, I have this field : $form[self::DESCRIPTION_PAGE] = array( self::TYPE => '...
0
votes
0answers
184 views

Ckeditor Allow all html tags and disallow a few

By default Drupal provides a form under text formats to allow some html tags, then it will disallow anything not in this allow list. I would like to do the opposite of this. Allow all html tags then ...
0
votes
0answers
80 views

CKEditor addon dependency searching in core module path

I am using Drupal 8 and having custom ckeditor module where I am adding plugins. I have downloaded iframe and fakeobjects addon and placed in the libraries folder. Then in my custom module, under ...
0
votes
1answer
297 views

CKEditor Image Button: Cannot insert images in body of a basic page - “Image field is required”

I am using CKEditor and WYSIWYG. After updating Drupal core to 8.5.6, I cannot upload an image using the CKEditor's 'image' button anymore saying "Image Field is required." I have checked CKEditor's ...
0
votes
0answers
148 views

TinyMCE and WYSIWYG not sizing the images I select properly. Image Resize Filter doesn't work either

I am using WYSIWYG and tinyMCE. I select an image by clicking on the insert/edit image icon in WYSIWYG toolbar, and I can clearly see in the File Browser that it is 64px by 64px. When I click on the ...
0
votes
1answer
35 views

Gray overlay and no dialog when clicking Image button in CKEditor

Attempting to get CKEditor and Media to work together on a Drupal7 site. Things are mostly working great, but when I click the regular Image button (or double-click an image, or use the context menu ...
1
vote
0answers
63 views

Properly export text format and editor settings

I'm trying to export the CKeditor settings and restricted_html settings but it's partially imported in the end. I'm exporting the editor.editor.restricted_html.yml and the filter.format....
0
votes
1answer
149 views

How do I disable/enable the Advanced Content Filtering (ACF) in CKEditor 4.8.0?

Please tolerate me for asking such a question. All the answers I found are for Drupal 7. There is barely any talk on this issue for Drupal 8. I am a beginner in Drupal and I am not a programming ...
0
votes
2answers
129 views

Allow users to use embedded HTML tags in custom blocks

I'm using CKEditor in Drupal 8 and the client wants to write HTML that contains embedded tags like so <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#...
0
votes
2answers
30 views

How can I set a custom CKEditor on only one field?

I'm using Drupal 8. I have a field that can only allow for specific styles, so I created a custom CKEditor and set the field to use it. Now when I go to the field on the content edit form, I see the ...
1
vote
0answers
185 views

CKEditor, create a dropdown button

From Drupal 8, I'm looking for create a very sample CKEditor plugin (CKEditor version 4.8). This plugin allows the user (me) to add quickly specifics tag in the text. After some google search, I find ...
0
votes
0answers
37 views

“Edit Image” failing with “The specified file foo-man-chu.webp could not be uploaded.”

I am attempting to replace a JPEG with a WEBP image within the Body of a Basic page, editing with CKEditor. I have added ImageMagick and GraphicsMagick alongside GD and the debug information shows ...
0
votes
0answers
58 views

How to have a WYSIWYG in all “Help text” field area

By default, the "Help Text" area that you can fill for a field in the Edit field form of a content type (or taxonomy, or...) doesn't use ckeditor. Here is what we can see under the text area: ...
0
votes
0answers
18 views

Issue with link toggle

I have a Drupal 7 site that is using the CKEditor module (version 7.x-1.18). When you click on the link it toggles back and forth from "Switch to plain text editor" to "Switch to rich text editor". I ...
0
votes
1answer
128 views

Paste a full SVG content to CKEditor - not working

I tried to paste a full SVG content into the CKEditor Full HTML Source But it gets corrupted and not working
0
votes
1answer
16 views

How to configure Wysiwyg + Ckeditor Library not to breaks source code lines

I'm using WYSIWYG Module with ckeditor as an editor. I use it with the full_html format My problem is that when switching from the rich-code to the source code view all the line breaks are removed. ...
0
votes
0answers
45 views

Edit node content, changes not saved for the first time

I am using Drupal 7, and recently found that when I edit a node, update the body content, save it. When view the result, found that my changes not saved. So I go back to edit page to double check, the ...
0
votes
0answers
57 views

How to allow [ngx-scroll-to] property for anchor tag in CKeditor

We have a AngularJs Template. We were trying to add [ngx-scroll-to] property for anchor tag. But seems to be editor stripping the square brackets when saving the content or when switching to editor ...
0
votes
2answers
355 views

Drupal 8 - Use CKEditor on textarea in custom module's controller response

I am trying to figure out how to use Drupal 8's CKEditor on <textarea></textarea> tags that are part of a controllers markup and not generated from a Drupal form. Has anyone done this or ...
0
votes
0answers
71 views

CKEditor and IMCE modules not working fine

I am having problems trying to integrate IMCE with CKEditor. I have followed readme.txt instructions from IMCE module but it still not working. I have set IMCE on File browser type (Link dialog ...