Questions tagged [input-formats]

Drupal handles text using filters and input formats.

Filter by
Sorted by
Tagged with
2
votes
0answers
209 views

Dependent exposed filters and taxonomy level Drupal 7

I have an exposed filter in a View. There you must select Brand of car. The taxonomy vocabulary is Cars, and has all brands as parents and all models of car at the second level under its mother term. ...
0
votes
0answers
39 views

Check_markup messes up urls/links

I'm using the check_markup function when printing results from a custom textarea field. The issue I'm having is with urls/links. If an url contains the scheme (i.e http.www.example.com) the output is ...
1
vote
1answer
100 views

Filter under condition based on value checkbox of current user profile

I use Views 3.x and Views PHP module. The task. Make Views filtering criteria that would make two different actions, depending on status of checkbox (TRUE or FALSE) of current user's profile. ...
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....
2
votes
1answer
553 views

How to programmatically change settings of input filters and activate them?

I'm looking for a way to programmatically change the settings of an input filter and activate it in Drupal 7. Let's take the Footnotes module as an example: It adds a new input filter that can be ...
1
vote
1answer
92 views

How do I enable the PHP filter only for webforms? [closed]

How do I enable the PHP filter only for webforms, and not other content types?
0
votes
1answer
61 views

Callbacks order in Drupal 7

I have 2 modules (filters): html_pre_filter and syntaxhighlighter. syntaxhighlighter_prepare_callback executes before html_pre_filter_prepare_callback. How to reoder them? I tried this function ...
1
vote
1answer
34 views

Expose a view filter that lists usernames of a specific roll in a roll down menu

I have a view on one of my sites that list a table of content that is connected to (entity reference) a user with a specific role. Is it possible to make an exposed filter that lists all users of ...
1
vote
1answer
131 views

How can I avoid this markup is filtered out from my block?

I generated a widget on pinterest. The result is the following: <a data-pin-do="embedPin" href="http://nl.pinterest.com/pin/1438168111370/"></a> <!-- Please call pinit.js only once per ...
0
votes
1answer
226 views

Add <style> element to node body field via WYSIWYG

I am working on a project where the admin wishes to be able to insert a element into a node's body field. The site makes use of TinyMCE editor (wysiwyg module) to edit text area fields. Currently ...
0
votes
0answers
35 views

How to make Drupal STOP stripping away <a> tags

Very simple HTML submitted in "Full HTML" mode via the editor (rich text disabled). Not only does Drupal smash all the empty space, the also strips away the tag wrapping a div. <a href="about"&...
0
votes
1answer
22 views

Return webform in a node

I have a custom filter added for a content type 'sample'. On selecting the custom filter for the node body, it checks for webform tokens like [webform:1234], by exploding it checks whether it is a ...
1
vote
1answer
150 views

HTML in square brackets -> output as normal HTML

We do import (using Feeds_ex) some data into Drupal (we do not control data-source we use to import data) and these data contains HTML in a brackets. so far I have found these 3 brackets: 1. [b]bla ...
3
votes
1answer
67 views

Create a permanent list of a content type

I have a content type named "clients" which can be filtered within a view and all can be selected using bulk operations. What I would like to do is take the filtered list in the view and copy it to ...
0
votes
1answer
16 views

Why can't I see the settings for the customfilter module in the Drupal admin?

I'm following this tutorial to add a custom filter using the Custom Filter module. I've installed and enabled the module. However, when I try to navigate to /admin/settings/filters like it suggests, ...
1
vote
1answer
21 views

How do I create an AND filter for the same field

I am having a problem with a view filter. I have one field called Category. The field contains a comma separated list of id numbers that represent different categories. I want to create a filter that ...
0
votes
1answer
17 views

Filter Node Reference options

I'm trying to set up the content types for a site and ran into a bit of a problem. Let's say I have a content type called Employee, and a list of taxonomy terms that holds function names. Each ...
1
vote
0answers
37 views

Apply text filter to teaser

I use inline images in my article content type. Currently my Teaser settings strip the HTML tags, leaving me with the text of the image tag, which runs into my article text. I'm reading about making a ...
0
votes
2answers
1k views

How to use tokens in a filtered text field

In Drupal, when you create a field, there is the option "Text Processing". You can select either "plain text" or "Filtered text". When I create a field with "Filtered text", I am unable to use it as ...
0
votes
2answers
4k views

Automatically add class to images added through CKEditor

I'm trying to add classes automatically to images which are added through CKEditor, I have spent considerable time trying to research this and found How to add class or attribute automatically to img ...
1
vote
1answer
1k views

How to add 'style=“width:100px”' in Global Custom Text field in a view?

It seems that the Global Custom Text field in a view delete part of my text. I write this: <div class="my-class" style="width:100px">Hello</div> but get this: <div class="my-class"&...
0
votes
1answer
166 views

filter to remove external links from text

Do you know about a way to automatically remove external links after user submits node? I want to keep only internal ones. I am not able to find any text filter or module which does that. Thank you ...
0
votes
2answers
98 views

What are some examples of filter Correct faulty and chopped off HTML?

In Drupal one of the text filters that is enabled by default is the filter Correct faulty and chopped off HTML. As I understand it must fix HTML bugs. Can anybody please give some example(s) of ...
0
votes
1answer
47 views

Validate text format when render page

Im making an exportation process (from SQL Server to MySql) and in the text_format column insert NULL values, currently the page is rendering the pure html (plain text) instead of render the html ...
0
votes
2answers
819 views

Using Php Filter with Ckeditor?

I need to use Php Filter with ckeditor. Problem is that Ckeditor change this: <?php echo "hello";?> to <p>&lt;?php echo "hello";?&gt;</p> How can I solve this? I ...
1
vote
0answers
15 views

D6 Views exposed filter on Search Term field that handles word parts

Is there anyway to have a View with an exposed Search Term field return results for word parts? I am currently using Drupal search. I'd like to use a hook inside of a custom module rather then going ...
1
vote
2answers
96 views

filter by taxonomy term = taxonomy term of referencing nodes

I have a node type 'hotels'. These nodes have a reference to a vocabulary 'regions' and a field 'hotel_images'. And I have a node type 'region_page' with also the reference to the vocabulary 'regions'...
0
votes
1answer
468 views

Filter module won't let me add nested values to my configuration

I'm working on the D8 port of my xbbcode module; my latest sources are here. The module is supposed to let administrators enable individual BBCode tags either in the global default settings or in an ...
2
votes
2answers
430 views

How to uninstall a text format created by a D8 module?

My module creates its own text format upon installation by having a file named config/install/filter.format.{format}.yml. However, I can't uninstall and reinstall the module, because the format ...
2
votes
0answers
30 views

How to implement a dynamic filter with views in D7?

I have a site where i have several main topics, each containing subtopics. I've made views block which is shown on each of the pages of the main topics where you have two exposed filter options: - ...
0
votes
2answers
46 views

Changing filter plugin settings before they are saved

(This is for D8, although parts of this filter settings API were already in D7.) As far as I understand, a filter plugin exposes its settings solely with FilterBase::settingsForm() - the central ...
0
votes
1answer
325 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 &...
0
votes
1answer
141 views

Ckeditor can not create new profile with input format

I've already a profile with input types but I can not create another, even when I am cloning the profile with input types. These are my text format, and I using administrator user. This is the list ...
0
votes
1answer
36 views

GTM container in block appears as regular text even though set to be Full-HTML

I have opened a block at the header of my site and have putted the GTM-container code inside while at Full HTML input-format. Yet, the container code appears as regular text (<p>&<a>) ...
1
vote
1answer
92 views

What is the D6 equivalent of D7's hook_filter_info?

I am backporting a module from D7 to D6, and I am not familiar with Drupal 6. The following three lines runs a chunk of text in the variable $input through the Markdown filter to produce $output. $...
0
votes
1answer
48 views

Find out which nodes use a specific filter

How could I find out which nodes actually use a specific filter? My nodes use an input format that has the Bbcode filter enabled. Now I need to know which (of the several thousand) nodes use BB code, ...
0
votes
1answer
154 views

Programmatically get input format in field template

We change some output in our field.tpl-files for body fields, depending on the input format that was used on the node (which itself depends on the user being able to modify it). Now this worked by ...
1
vote
2answers
1k views

Display HTML code in a Drupal field as plain text

I am using Drupal as a blog for posts about programming. Naturally, I have to post code samples. When I post the code samples, Drupal renders them as actual HTML. How can I stop this from happening? ...
1
vote
3answers
50 views

Practical solution to get an overview of input formats in use

I'd like to clean up unused text formats on some D7 sites. So I need to know which formats are not used. I tried using VBO for this, but there is no field Content: Text format I can add there. What's ...
1
vote
2answers
143 views

Is there an Input Filter without built-in restrictions?

Is there an Input Filter without built-in restrictions? The built-in Drupal filters and some of the other filters I have checked seem to come with their built-in restrictions, eg The Drupal's own ...
-1
votes
1answer
818 views

Does the Full HTML format allow all tags, and is there an Input Filter without built-in restrictions?

Does the Full HTML format allow all tags, without any restrictions at all? I am not quite sure, but it seems some input filters have other restrictions in addition to what their options dialogs allow.
0
votes
4answers
3k views

Does Drupal strip out style and span tags?

I was trying use span and style tags in pages, rather than in CSS and it seems that Drupal is configured to strip them out whether the input format is Filtered HTML, i.e. they are applied to Full HTML....
1
vote
1answer
738 views

How to import content in markdown format?

I have text in markdown format. How should I go about importing this into my site? I would think a Feeds Tamper plugin to convert markdown to html would be ideal. Does such a thing exist? Is there a ...
2
votes
0answers
46 views

How do I filter a text field, based on content type?

I've built a custom filter that parses images that were inserted into the node body field. I am trying to have the filter render image sizes based on the content type of the node being created/edited. ...
0
votes
1answer
59 views

Drupal 7 trim user input and other checks to prevent security issues

What is the recommended way in Drupal to perform trim and other checks before accepting user input to avoid sql injections and other similar security issues? Thanks.
0
votes
1answer
291 views

Change text format used for text field when displayed in a view?

I have a content type with a text field that may contain a token from the Media module (that WYSYWIG inserts). This token is typically transformed into HTML by enabling a specific filter for the text ...
1
vote
1answer
1k views

Moving the a view Contextual Filter default value(“PHP Code”) to a module code

I am really wondered to know how I can move my designed view's Contextual Filter default value which is being provided by my written code as PHP Code, to a module code or a hook. Is there any ...
2
votes
1answer
1k views

Where is the entity in code field? [Display suite module]

I create a code field in Display Suite module and I need to insert a format_plural in it like print format_plural([node:comment-count], '1 Comment', '@count Comments'); but token do not work in ...
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>...
1
vote
0answers
698 views

CKEditor incompatible with 'limit HTML tags' text filter?

I'm using CKEditor Module 7.x-1.15 with CKEditor v4.4.4. This is applied to the Drupal 'Filtered HTML' text format. I want to filter out <DIV> tags, so have checked 'Limit allowed HTML tags' in ...

1 2
3
4 5
7