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 [input-formats]

Drupal handles text using filters and input formats.

0
votes
0answers
7 views

Ckeditor with programmatic text_format field

I have ckeditor installed on my site, and when I use filter formatted textareas on my website where admin pages or fields were created using the UI, the ckeditor replaces correctly. When I use the ...
-2
votes
0answers
15 views

How to give format for Audio, Video Player ,Image, PDF viewer for a single content type files field?

I have a content type field "Files" for input of digital files like Audio, Video, PDF, Images files. How can I view them on record page so that if video is there it plays in "Video JS" Format, Audio ...
0
votes
1answer
34 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
35 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
237 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 ...
0
votes
0answers
29 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 ...
4
votes
1answer
96 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 ...
1
vote
1answer
32 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 ...
0
votes
2answers
80 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: ...
0
votes
1answer
17 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 ...
-2
votes
1answer
158 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
95 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
80 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
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
26 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;...
2
votes
2answers
346 views

I want to enable a disabled input format

I considered 'restricted HTML' as unnecessary and set it ‘disable’. Because I thought it possible to re-enable. However, I have not found a disabled format on UI. Since there is no choice, I decided ...
0
votes
0answers
22 views

Hook or any other extension place for changing the input format order in form display?

I want to change the order of the input formats (e.g. input format "rich text" comes before "text" in content type "article") in the node form field display. Could you recommend me a hook or any other ...
1
vote
0answers
29 views

Is there a Drupal API function for retrieving text filter settings?

I've created a custom text filter, building on the filter_example.module. The filter lets the admin enter a setting for the filter (just like the "foo" filter in the example lets the admin set the ...
0
votes
1answer
31 views

How to securise custom modules

I'm trying to understand how to securise my custom modules to avoid php insert into custom inputs and SQL injections in my db_query. For inputs I'm using : $form['custom'] = array( '#type' =&...
0
votes
2answers
346 views

Rendering plain text instead of formatted data

In my custom module (in Drupal 8), I am using a form field (in a custom form) to use CKEDITOR with the following code which loads the editor fine. $form['full_detail_text'] = array( '#type' => '...
2
votes
0answers
63 views

How can an Entity Reference filter against another field?

In Drupal 8, I have a content type for "Advances" that contains an Entity Reference field to "Technology". Each instance of an Advance should be of a certain type of Technology, which has Prerequisite ...
1
vote
1answer
153 views

What is the difference between “Limit allowed HTML tags and correct faulty HTML” and “Correct faulty and chopped off HTML”?

In CKEditor Filter processes (/admin/config/content/formats/manage/filtered_html) there are filters. If you use "Limit allowed HTML tags and correct faulty HTML" do you still also need the other one, ...
0
votes
1answer
677 views

What is wrong with my custom token to embed entities via token?

Edit: I guess it has something to do with the info part: function mymodule_token_info() { $info = array(); $info['types']['embed'] = array( 'name' => t('Embed'), 'description' => t('...
2
votes
2answers
1k 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.
3
votes
2answers
2k 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 ...
0
votes
1answer
32 views

PHP filtered page is cached

With a few years of Drupal 6 and 7 experience, I've happily made my first Drupal 8 installation. In my previous installations of Drupal I've used custom made PHP code that does a lookup in a personal ...
0
votes
1answer
58 views

Increase Placeholder Length

I have a webform that has a textarea input. I am trying to update the placeholder text. It seems to have a limit of 128 chars. Is it possible to update this to allow for a longer placeholder?
0
votes
1answer
118 views

Cannot load module uninstall page - says module does not exist

I accidentally deleted the Markdown filter module from the file system while it was still enabled. So I installed it again, via the GUI. Now I cannot load the module uninstall page - it says "The ...
0
votes
1answer
21 views

What are Text Filters and Input Formats?

In views, when I add a field of type body, there are some options given: text_default, text_plain, text_trimmed. How do these options filter the contents of the field and where can they be found in ...
0
votes
1answer
66 views

How to create a block of links shared by a user?

I am using oembed to convert url to embedded content. I have enabled the oembed input filter in a text format. Now I want to create a block using views to only show the posts which have these links. ...
3
votes
3answers
1k views

How to create a custom text input filter?

I am using plain text format. I want to create an input filter for when a user enters #15, it should be converted to a link pointing to the post #15. I want to do this for the Statuses (Social ...
0
votes
1answer
67 views

How set specific input format for specific field like in Drupal 7?

I am in a need of the Drupal 7 functionality where I could select specific input format for specific field whereas in Drupal 8 this is based on permissions and I really dislike it and for a specific ...
0
votes
0answers
15 views

What would be the best to retrieve all fields (or field instances) those utilizing filter formats?

I want to get all fields that utilize input formats. What would be the good way to achieve it?
-1
votes
1answer
321 views

How to insert PHP code into the Drupal 7 block with PHPFilter to enable a html form working?

<form action="run_pipeline.php" method="post"> Insert SRA identifier <input type="text" name="email"><br> <input type="submit" value="Run data processing pipeline"> </form&...
3
votes
1answer
63 views

How to create a Gmap view that can be filtered?

I have a taxonomy vocabulary that has a multiple terms. I can create a view that shows the location of all terms in a map, but I want to filter these locations by term. I mean the user first chooses ...
0
votes
1answer
34 views

use two formatter for single field in view

I want to use two formatter 'url,as plain text' and 'count the click happened on this link' for single field in view page
0
votes
1answer
36 views

Create dynamic external link URL without filtering or stripping protocol

In my module I'm creating a dynamic external link to launch a local FileMaker database client and run a FileMaker script that finds a record like so: FMP://192.168.123.123/DatabaseName.fmp12?script=...
1
vote
1answer
212 views

CKEditor is adding inline style to resize my textarea on node add/edit form

No matter how many rows I define the textarea to be in the content type configuration, I get a huge editor taking up almost the whole browser window in the node add/edit page. I tracked this down to ...
1
vote
0answers
314 views

Why is my form submit button being rendered twice?

I have built a form and this is my submit button for it: public function buildForm(array $form, FormStateInterface $form_state) { $form['name'] = array( '#type' => 'textfield', '#title' =...
0
votes
1answer
281 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(...
1
vote
1answer
1k views

How do I stop automatic double break tags in ckeditor?

After updating the ckeditor module i find that saving existing content results in adding another break tag following existing break tags. When i create new content and press enter and save the final ...
0
votes
1answer
19 views

I want to filter to show orders that their ending date is today

I am using Drupal 7 and I have a webform where people can order a product and they enter the date that they will pick up that product. I want to make a view that will show me the poeple that are ...
3
votes
2answers
550 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 ...
1
vote
1answer
52 views

Can I use drupal_get_form and drupal_render within a custom Drupal 7 input filter?

As the title says: I've got a custom input filter in Drupal 7 which replaces a token with a custom drupal form. Without showing the complete code, which might just confuse things, The main essence is ...
0
votes
1answer
73 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 //)
4
votes
1answer
640 views

“Limit allowed HTML tags” filter is deleting Ckeditor table styles

I'm using the "Limit allowed HTML tags" filter in my text format and put this to the allowed tags: <th style> Anyway my table styling <th style="width: 60%;"> added in Ckeditor is ...
6
votes
1answer
1k 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
40 views

Adding PHP function code to a node returns Eval error

I activated the PHP filter and it works fine, except when I declare a function. I keep getting the following error. Fatal error: Cannot redeclare test_function_test() (previously declared in /web/...
1
vote
2answers
107 views

How to show link upload option on statuses updates form which converts to embedded content? [closed]

I am using Statuses (Social Microblog) module to allow users to post status updates like other social networks. To enable users to upload photos and videos, there is a module called Facebook-style ...
1
vote
1answer
35 views

Bizarre Behavior with Markdown Filter and Cache Clearing

We are trying to allow Markdown input on long text fields for certain content types. It is proving difficult. Here is what I have done: Installed Markdown filter module. Added a new Text Format in ...