Questions tagged [input-formats]

Drupal handles text using filters and input formats.

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

How do I override /theme/custom twig in my module to render input fields?

I have a module that is building a form. I want to theme the form using twig within my module so it does not interfere with my theme/custom twigs. My buildForm function is: public function buildForm(...
0
votes
2answers
1k views

What HTML tags for image with style?

In below codes, there is style="float: left;" that make the image float. <p><img alt="" class="image-medium" src="http://localhost/d7/files/styles/medium/public/about-us/images/2012/02/28/...
0
votes
0answers
18 views

Converting embedded images from Media module to Markdown

My Drupal 8.8 site (media embed is now in core) uses the Markdown module for the Body text of nodes. I created a custom view mode, Ebook export, which has some twig templates that output the raw ...
6
votes
4answers
4k views

How to use wysiwyg text editor (text_format) in a system configuration form

I couldn't find any documentation or examples about this. The implementation is very problematic. Do you a means to do this? Problems While trying to create a system settings form with text_format ...
1
vote
3answers
3k views

wysiwyg ckeditor inline styling not working

I'm using wysiwyg api with ckeditor, but I can't make it to use inline styles like when I use indent from editor, it actually drops the style (which is margin-left) in output. it's not an override, it ...
1
vote
1answer
63 views

Problem with text format and base64 inline images

I am using Drupal 8.6.13 text field with Full HTML text format for a field where we want to have content with inline base64 images (due to the synchronization with Gather Content). Synchronization ...
0
votes
2answers
396 views

Inserting Block with Custom Input Filter Module via Shortcode Causing http 500 error

I have a custom input filter module, and I am trying to figure out why it crashes when I attempt to insert a block into a post via a shortcode. The method works perfectly when I am inserting a string, ...
0
votes
1answer
363 views

TinyMCE not appearing on custom form

I am creating a custom form and have run into a problem. I'm using the WYSIWYG module and for some reason the text areas on this custom form don't show as rich text editors (tinymce shows on other ...
3
votes
2answers
452 views

Field in Custom Content Type Stripping out <img> tags

Drupal6: I have a custom content type, with a custom field, set to textarea. The content type's instance filter is set to Full HTML. When I add an image tag to the custom field, the image renders in ...
0
votes
0answers
24 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
33 views

Make CKEDITOR Caption Required

Using Drupal 8 Ckeditor Core plugins -> drupalimage/drupalimagecaption how do I make an image caption required? The checkbox shown should always be clicked.
0
votes
0answers
23 views

Set default/restrict text formats based on node type [duplicate]

In Drupal 8 (not D7) as noted here How do you limit a text input to only specific content types/fields. For example, I create a new input type here: admin/config/content/formats and call it "...
0
votes
1answer
23 views

Drupal 8 - Add custom HTML with script to embed on a page as block

I need to add a custom form that has scripts and styles into a page as a block. Its dynamic, so I couldn't attach the scripts (#attached) as libraries. I just need to place the contents as is. $...
7
votes
4answers
7k views

How to hide the text formats help text?

I want to hide the description of the text format under the "Comment" box which says: No HTML tags allowed. Lines and paragraphs break automatically. There are a variety of ways to do this on Drupal ...
0
votes
1answer
43 views

How to allow HTML attribute with namespace using filter

One of the analytics providers requires all the links to have a specific attribute sc:linkname to track details. Drupal 8 filter works for linkname but not with sc: prefix. From https://html.spec....
0
votes
1answer
46 views

How can I programmatically apply text formats?

I've created a custom text format I'm trying to apply to a field programmatically. As best I can tell, the format IS getting applied, but it is not stripping HTML tags like it is supposed to. The ...
0
votes
2answers
46 views

Toolbar to insert HTML tags while editing content

This very site features a neat toolbar just over the textareas in forms, where clicking on "B", for instance, will spawn **strong text**, abstracting away the need to know Markdown. Is there a way to ...
3
votes
3answers
300 views

Filter Entity reference based on attribute [duplicate]

Here's my situation: I have a "Project" content type. I want to be able to add employees to a project based on their role with a select or multi-select drop down widget with unlimited number of values....
0
votes
1answer
43 views

Regarding Filter HTML input option [duplicate]

I want to allow one more tag in Filter html Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>. I want to add <table>...
0
votes
1answer
80 views

Convert http to https on save

While migrating our site, we have put them on 'SSL required'. How can we best force, when editors save datas containing http link, a conversion to https ( or //).
1
vote
1answer
460 views

Custom tokens and/or text filters for consistent link look?

I have a site with a range of products. In order to ensure an easy input for the content editor and a consistent look throughout the site, I thought I'd make an input filter that would replace any ...
0
votes
0answers
43 views

Caching input filter results

I'm creating an input filter that is quite expensive, as it makes a call to a remote service as part of the processing of the output. In Drupal 7, I'm pretty sure that the filtered output of an input ...
0
votes
1answer
975 views

How can I make my site stop adding <p> tags in textareas?

For a current project I have a content type’s textarea set to Full HTML. But where I’ve added a <span> tag, Drupal will go ahead and enclose it within a <p> tag which is definitely not ...
0
votes
0answers
53 views

Bootstrap Responsive Wrappers module's Format field won't save using Drupal 8

I've setup a new style (Configuration / Content Authoring / Text Formats and Editors) in order to use the Bootstrap Responsive Wrappers module for video embeds. I can apply the Format to text fields ...
0
votes
1answer
44 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
126 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
1answer
814 views

Migrating input formats causes errors

I am trying to write custom migrations to migrate my Drupal 7 website to Drupal 8. I am currently using Drupal 8.6.7 and Drupal 7.61 for a copy of the production website. So far I have set up the D8 ...
1
vote
1answer
61 views

Does the summary area support input filters?

I have noticed that text filters placed in the summary area don't seem to work, that the raw text appears in the summary info when posted in Twitter, Facebook and the like. Is that some inherent ...
4
votes
1answer
163 views

Is it possible to make manual teaser breaks work with “Filtered HTML”?

This question is about Drupal 8. Placing the following line inside a story node's body (I guess it also works for other content types) adds a manual teaser break: <!--break--> In Drupal 7, to ...
0
votes
2answers
401 views

How to remove exposed filter if value is supplied in url?

We have a view page (path = /some-path/) that has an exposed filter called category. The detailed view setup is below. How would we hide the exposed filter if it is supplied from the url? View setup: ...
6
votes
1answer
2k views

Changing a plain text field to enable rich editing.

In drupal 8, I setup a plain text field and now I have no way to change it back to rich text editing. I could take the approach of just setting up a new field and copy the field data from the old ...
0
votes
1answer
20 views

Show content with a date after the current one on a view

I'm creating a calendar of events with Drupal 7 using views. At the moment the elements are shown in order of the date of each one (I have a date field where I put the date of the event). Now I need ...
8
votes
4answers
4k views

How to redirect an exposed filter query to a views results page that lives in another panel page?

My setup: Drupal 7.2, Panels 7.x-3.0-alpha3, Views 7.x-3.0-beta3, Chaos tool suite 7.x-1.0-beta1 Say I want to create a fruits directory website. In views I have a content pane "fruits" with exposed ...
-2
votes
1answer
398 views

Highlight code for code presentation in articles [closed]

What is the solution to highlight PHP, JavaScript, or Java code in Drupal 8 articles? I googled and found some information about Geshi for CKeditor. I installed it, but it converted < and > into ...
1
vote
0answers
154 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....
32
votes
18answers
39k views

How to hide Input Format Options and help text under a textarea?

How to hide Input Format Options and help text under a textarea when adding|editing a node?
17
votes
7answers
6k views

Change the input format for 3000+ nodes

I have a lot of nodes that need to get their input format changed - I could do that by hand, but then I won't be done before Christmas 2014. Where is Drupal storing that information? How can I ...
4
votes
2answers
932 views

Help with #text_format and field widgets

I'm struggling with #type 'text_format' for a widget form field as this field gets expanded two separate elements, one holding the orignal element and the other the format selector. The orignal ...
0
votes
1answer
301 views

Hide formatting options from a CCK field in Drupal 6

I have a custom module in which I am using hook_form_alter to remove the formatting options/help text for the body and comment fields:- function mymodule_form_alter(&$form, &$form_state, $...
0
votes
2answers
2k views

Make node/field text input format available to Views

The standard Content list in Drupal 7 (displayed with the Find content menu item) gives me a table of nodes in the system with various attributes, such as the type. I want to add the text type (e.g. ...
0
votes
1answer
147 views

Adding an input filter to automatically replace text with HTML via a script

I am using Drupal 8 on Pantheon. This is a website for an ebook. The ebook HTML was generated using a Perl script that automatically replaces text like this: APPLE -> HTML including an apple image ...
1
vote
3answers
50 views

How do I set the text format used in a message (from the Message module)?

I'm using the Message module on a site that has both the Filtered HTML and Full HTML text formats. By default, Message appears to use Filtered HTML, but I would like to use Full HTML instead. However,...
0
votes
2answers
3k views

How to use stye attribute in custom block markup?

I'm developing a custom block in Drupal 8. In my build() method I've got: $progress_markup = array( '#theme' => 'progress_bar', '#percentage' => $registration_percentage, '#message' => ...
1
vote
0answers
31 views

Text Editor Rejecting certain words

I have been having an issue with drupal's text editor. I am making a custom block for FAQ section of my website but whenever I try to html code containing certain words inside such as 'from' etc. it ...
1
vote
0answers
32 views

Entities being stripped from formatted field

I have a formatted text field using the basic_html filter, which is set up like this: It is removing HTML unicode entities, in the format &#x<hex>; for example, the Euro symbol is &#x80;...
0
votes
1answer
323 views

Can I make Text Field accept filtered_html?

I have a content type where a field is the common name for a USA president. In examing a legacy database I'm importing some presidents have (simple) HTML in their name. For example Dwight Eisenhower &...
6
votes
2answers
2k views

How do i force a text format and hide the format selector in a formatted text field?

I Want to force a certain text format in a user profile text format field and hide the text format selector dropdown. How do i do it? This is for Drupal 8.
2
votes
1answer
373 views

Improvements in Drupal Gardens way: How do I place an input filter selector in CKEditor?

I would like to know how to achieve two improvements in WYSIWYG in the same way Drupal Gardens does. The first one is to place Input filters selector as a dropdown selector within the WYSIWYG toolbar,...
2
votes
2answers
770 views

Enable filter format per field?

Is there a simple way in Drupal 8 to set a filter format on a field and not show other format options that are accessible by the role of the current user? I want to have a field with a very stripped ...
5
votes
3answers
12k views

How to remove format description in date_popup form field?

How can I remove format description in date_popup form field? $form['payable_by'] = array( '#type' => 'date_popup', '#title' => $amount !== '' ? t('Instalment payable date for ...

1
2 3 4 5
7