Questions tagged [wysiwyg]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

impossible to save source code in wysiwyg blocks if <a> does not contains some strings

It is impossible to use an icon as anchor in wysiwyg blocks. <a href="https://myfburl"><i class="fab fa-facebook-f "></i></a> The content is lost when editing back a block ...
0
votes
0answers
24 views

Drupal 7 WYSIWYG module with CKeditor library stripping form and input HTML tags when inserted into a block

I'm wanting to add some code snippets from MailChimp. We are using the WYSIWYG module (7.x-2.5) with the CKeditor library version (4.9.2.9). When I add the code to a block it is stripping out when ...
-3
votes
1answer
23 views

Editing classes on a div in CKEditor

We are using the ckeditor_div_manager module on our Drupal 8 site to provide the Div Manager plugin on our CKEditor. On of my content editors reports that, while it does allow her to add a wrapper ...
0
votes
0answers
30 views

CKEditor doesn't work after updating

I've updated a drupal website to the latest 7.x version, and CKEditor stopped working. I had it originally getting //cdn.ckeditor.com/4.5.4/full-all, I've updated to //cdn.ckeditor.com/4.13.0/full but ...
0
votes
0answers
30 views

Ckeditor pasted url links become hyperlinks

We have disabled 'Convert URLs into links'. When you copy a url link from a browser url field like: drupal.org. Your clipboard contains the FQDN: https://www.drupal.org/. When you past this into ...
0
votes
0answers
20 views

CKEditor Link to write full alias instead of node ID?

Using CKEditor's CKEditor Link plugin in a WYSIWYG field is a quick way to link to internal content. When the page gets rendered, the link URL is written using the node ID, like this /node/123 instead ...
0
votes
0answers
12 views

In CKEditor + IMCE (Drupal 8) image uploader how to remove the Drupal base folder name in image path?

I have a Local Setup with url http://localhost/mydemo in Drupal 8 whenever i upload an image through CkEditor or IMCE it takes the path as: mydemo/sites/default/files/abc.img I want to remove the ...
0
votes
1answer
46 views

CKEditor add custom class to table

I want to add a class to a table inserted in CKEditor. I have tried to add a custom style using the styles dropdown and add this line, table.my-custom-class|Table, but when clicking on the table the ...
0
votes
1answer
23 views

Entity:media doesn't exist error when searching for url in “add link” in wysiwyg

When adding a link into a rich text field (wysiwyg) (see images bellow) and searching for a keyword the throbber icon keeps spinning and that's it. I looked at the error logs and found the following, ...
0
votes
2answers
50 views

CKeditor stripping allowed style attribute

I've installed Colorbutton to my Drupal 8 site. I have enabled the button for Full HTML and For Basic HTML I have allowed the attribute <span style> in the Basic HTML allowed attributes area. ...
0
votes
0answers
8 views

How can I attach a css file within the ckeditor iframe [duplicate]

I need to attach a Drupal library but only in iframes that ckeditor uses. I've noticed there appear globals libraries, but I only need to add this in a specific case. Also, when I clear the cache, ...
1
vote
0answers
32 views

Prevent User from changing html in CKEditor [closed]

I wonder, if there is a way to prevent users from harming any html within my default html in a CKeditor textfield. Yes I know this is not the Drupal way. Normally I would create a paragraph with its ...
1
vote
0answers
21 views

Caption field with default value inside CKEditor

I activated the caption filter under Text format configuration to add description to media inserted via CKEditor Is there a possibility to add a default value to this caption field whenever I add a ...
0
votes
0answers
13 views

Export Text Format and CKEditor Profile with Features

First, this is not a duplicate of this, because I can't even get that far. The OP was able to put their CKEditor profiles into a Features module with all of the settings are stored in the Features ...
-3
votes
1answer
42 views

Wysiwyg editor for webform 5

Is there a way to configure textarea fields in Webform 5 to use Wysiwyg editor ? preferably without coding and overlay capability (I mean something like https://www.jqueryscript.net/form/jQuery-Plugin-...
1
vote
0answers
34 views

How do I put back de CKE image dialog box?

On Drupal 8, I can't find the image dialog box I used to have on Drupal 7. I read this is a core issue, but my contributors are used to it and have a different level of expertise. This little dialog ...
0
votes
0answers
33 views

Why do unwanted hidden images get added?

Due to some reason some unwanted hidden images get added to textarea field if kept empty. like below. I have no idea why this is getting added. Please help if some one know about it.
0
votes
1answer
37 views

Filter upon paste in CKEditor

My stakeholders encountering a situation where they have to do finagling in the CKEditor window when they copy and paste from Google Docs, which they do often. Ideally, what would happen is that ...
0
votes
1answer
50 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
213 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
42 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
88 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
54 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
667 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
40 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
44 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
22 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
714 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
38 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
534 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
286 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
1answer
1k 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
1answer
331 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 ...
1
vote
1answer
887 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
234 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
583 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, ...
1
vote
1answer
203 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
126 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
391 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 ...
3
votes
0answers
3k 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
214 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
185 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
613 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
332 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
445 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
377 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 ...
1
vote
0answers
390 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
1answer
613 views

Cannot insert images in body of a basic page

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
1answer
65 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
135 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....