Questions tagged [wysiwyg]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
13 views

Remove a button from CKEditor based on the role of the current user

I have a text format which should access by user role A and the admins but I only want the admins to see the "Source code" button. User's of the role A should not see this button but they ...
0
votes
0answers
14 views

Syntax for adding content inside group in Gutenberg json template

I'm using Gutenberg on Drupal 9. When editing the Gutenberg JSON template for a content type I'm able to add placeholder headings and groups like so [ ["core/heading",{"placeholder"...
0
votes
1answer
22 views

Unable to preview media items

I have a node page where, in the WYSIWYG, I have embedded about 50 media items. When I edit the node, I can see this error for some of the media items. An error occurred while trying to preview the ...
1
vote
0answers
24 views

How to allow   (and other HTML entities) in ckeditor?

Our customer want to be able to add thin spaces in addition of non breaking spaces. But when we try to add the character   in source of ckeditor, ckeditor doesn't keep it and convert it as ...
0
votes
0answers
119 views

How to set absolute URL for images uploaded in CKEditor instead of relative URLs

I am using CKEditor to send HTML user emails. When I upload an image by using the image icon from the bar, the image src is a relative URL to the image. This is causing issues in the emails. If I use ...
2
votes
0answers
42 views

How to add conditional on Gutenberg's color theme-support?

I've added the Gutenberg theme-support on my custom theme. I want to add conditional based on text color and background color. For example, selecting the black color background will reset the default ...
2
votes
2answers
320 views

How can I stop the full HTML editor from deleting my <p> paragraph?

https://drupal.slack.com/archives/C1BB308HH/p1602318464360700 Link to slack question in #support JSFiddle of the offending html: https://jsfiddle.net/tyeth/xr4ohast/ Demo Video showing the paragraph ...
0
votes
1answer
91 views

Allow specific HTML tags inside a text field of a custom content type using CKEditor

I would like to add a new content type with a field which supports some HTML tags. So far, I added a text editor format and there I chose CKEditor as the editor and edited the list of allowed tags ...
2
votes
0answers
175 views

CKeditor Media Edit: AJAX HTTP error 500 [closed]

How can I fix the AJAX HTTP error 500 to make the "Edit media" button in the body of the CKeditor work? I am trying to use the "Edit media" function to edit an image, which was ...
2
votes
2answers
266 views

Can users be forced to insert only plain text by default in CKEditor?

I know there is "Paste Text" button in CKEditor, and I can limit allowed HTML tags. But it's very hard to explain clients to use specific button when they insert text. As result they often ...
0
votes
0answers
22 views

Issue with CKeditor

I am building in Drupal 9.0.5 and just discovered that the Styles dropdown menu in the CKEditor is disabled even though I have classes listed. Not sure what's wrong. I've read and read and I'm pretty ...
0
votes
1answer
24 views

HTML tags after umlauts causing premature header sending - CK editor

I'm maintaining some old Drupal 7 site (not created by me) and since couple of months ago it started acting strange (I didn't make any change on site): Inside some content type there is a formatted ...
1
vote
1answer
49 views

How to render text including video embed field

I have a formatted text field, and am using the video_embed module to allow users to embed video into that field, using the video_embed_wysiwyg submodule. I am then trying to render the field in a ...
0
votes
0answers
14 views

Best way to keep customized ckeditor library up to date

Background A D7 site I am working on uses wysiwyg module with ckeditor library. (I know there is a dedicated ckeditor module, but we want to stick with what we have on this existing website. The ...
1
vote
1answer
95 views

Drupal 8 CKEeditor license/pricing

Drupal 8 ships with ckeditor as the default text editor. Drupal itself can be used free of charge without limitations. At least this is what I thought until now. While CKEditor seems to be OpenSource, ...
1
vote
1answer
89 views

How to automatically generate anchor ids to CKEditor added headers

How can i automatically generate anchor ids to h2 and h3 added using ck editor ? I need it for making a table of content.
0
votes
1answer
156 views

Is there a way to enable the Gutenberg editor so I can use it with custom blocks?

I've installed the Gutenberg Editor module and have it working with various content types, however I'd like to also use it to create content for custom blocks (as in structure > block layout > ...
0
votes
1answer
68 views

Why am I not seeing CKEditor buttons on prod?

Okay, so I configured the Full HTML text format and added some buttons to CKEditor locally in a Lando environment. Then I exported the configuration with drush cex, committed it, pulled and imported ...
0
votes
2answers
171 views

CKEditor adds extra <p> tag

CKEditor inserts extra <p> tags when users enter a newline. How do I disable this automatic paragraph tag?
0
votes
0answers
34 views

I can't see the newly added toolbar buttons I added to CKEditor

I have added some new buttons from the toolbar configuration onto the BasicHTML profile of CKEditor (admin/config/content/formats/manage/basic_html) I've added the standard text alignment buttons and ...
0
votes
1answer
194 views

CKEditor strips all inline CSS and some tokens

I'm trying to add a color and font size to some text using the CKEditor. As soon as I save it these are stripped out. I've also noticed some tokens are stripped down when certain settings are enabled. ...
0
votes
1answer
34 views

CKeditor doesn't work in controller response within a default theme

In a Drupal 8 project I've a controller which returns a form that contains a text_format field. CKeditor is working perfectly in my administration theme (Stable), but it does not on the default theme....
0
votes
0answers
19 views

Get data from one editor field and pass that into another editor field

I have no idea if this is even possible, but I figured I'd ask anyway. I'm working with a site that is on Drupal 8, and long story short, we don't have access to extending nor updating much so any ...
0
votes
0answers
30 views

When/how are text format filters executed/applied?

I was experimenting in D8 with filters on text-formats to understand why i was not seeing CSS i had placed in a block. Turning on and off Limit allowed HTML tags and correct faulty HTML and Correct ...
0
votes
1answer
37 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
43 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
269 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
1answer
64 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
61 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 ...
1
vote
1answer
476 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
43 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, ...
3
votes
2answers
2k 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. ...
1
vote
0answers
152 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
48 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 ...
-3
votes
1answer
90 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
50 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
1answer
72 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
90 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 ...
6
votes
1answer
752 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
71 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
176 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
85 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>...
1
vote
1answer
2k 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
49 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
72 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
26 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
1k 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
154 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
2k 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
614 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
2 3 4 5
17