Questions tagged [input-formats]

Drupal handles text using filters and input formats.

Filter by
Sorted by
Tagged with
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 ...
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 ...
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.
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?
10
votes
3answers
10k views

How do you set a default input text format per content type?

I want to be able to set a different default input text format per content type and per content field. For example, the format type choices might be "Plain text" and "Rich text editor" and in some ...
5
votes
4answers
8k views

Is there a way to load the current entity object?

Is there a way, from anywhere in drupal, to get the current entity object? I'm using the hook hook_filter_FILTER_process() and I'd like to replace things in the $text with data from the entity, but it ...
3
votes
3answers
6k views

How can I remove emoji from all user input?

It looks like iPhone emoji are not currently supported in Drupal 7 on MySQL. When I try to save a node containing an emoji (I 💛 U!) in the database, I get an SQL error: PDOException: SQLSTATE[...
2
votes
5answers
3k views

Embed vimeo video into the body field

How do I embed a vimeo video into the body field. The iframe is being removed in my input format. How do I add it?
3
votes
2answers
2k views

Unable to set placeholder on password input

function customization_form_user_register_form_alter(&$form, &$form_state, $form_id) { $form['account']['pass']['#attributes']['placeholder'] = t('Password'); } I am trying to set ...
11
votes
9answers
32k views

How do I get line breaks when using Plain Text format?

I feel like this should be reaaaaaally simple, but it's driving me crazy. I have 'plain text' selected for all my Body elements. I don't want anyone to be able to put in any html at all when filling ...
10
votes
4answers
3k views

How to find all inputs that make use of the php input filter to fully disable the php filter module?

I want to disable the PHP Filter module on a large website, but going through all nodes, blocks and other fields where you could make possible use of the php filter would take eons. Is there a simple ...
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 ...
5
votes
6answers
9k views

How to disable “Plain text” for a specific role?

I see that from admin/config/content/formats/plain_text I can not disable it for a individual role. How can I do this? UPDATE: I can change the attributes of the format and rename it, however I see ...
4
votes
2answers
2k views

Is allowing Full HTML (HTML filter on) input for all user roles safe?

Is allowing Full HTML input for all user roles safe as long as I enable the HTML filter?
3
votes
1answer
875 views

Limiting allowed HTML tags in comments only

I can't figure out how I can limit my text format or HTML codes for the comment sections on a node. If I edit the input formats with user roles, it edits the entire thing, including the node body and ...
3
votes
2answers
4k views

Views taxonomy exposed filter, show tree/hierarchy in drop down menu

I have an exposed taxonomy filter that allows the user the filter by term. The vocabulary is 2 tiers, however in the exposed filter menu the hierarchy appears flat. Is there a method/module to show ...
3
votes
1answer
823 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 ...
2
votes
2answers
3k views

How do I prevent CKEditor 4 from stripping Google AdSense asynchronous tags?

For whatever reason, CKEditor 4 is stripping Google AdSense asynchronous tags from my Full HTML text format. What starts as this (placeholders substituted for IDs): <script async src="//pagead2....
2
votes
1answer
848 views

Full Html Text format (and wysiwyg) show only for administrator role

I use Wysiwyg module with CKeditor since months and all worked well. Wysiwyg module is linekd only wit my input-format "Full html" and this is granted to use to my role "Editor". it worked very good. ...
1
vote
1answer
619 views

How to install a text filter for plain_text input format

The users at my Drupal 7 website discuss a card game in plain_text comments and I'd like to format the hearts and diamonds characters by red color. Based on the Examples module recommended to me here ...
1
vote
0answers
1k views

How to create a new text format filter? [closed]

I am trying to create a new filter for iframe reponsiveness purposes on admin/config/content/formats/manage/basic_html, but I cannot see the filter. It is listed as enabled filters on admin/config/...
1
vote
1answer
1k views

how to assign different Text formats for each Long Text fields?

In my node creating form i have two Long Text fields, they are: Article Lists And i have created two Text Formats they are: Article Lists Now, is there any Drupal way to assign: Article (...
0
votes
1answer
103 views

Apply a filter to a view

I have some code: http://mysite.com/node/1/edit <?php echo "Hello World!"; ?> I have a content that processes it: http://mysite.com/node/1 Hello World! I have a view that displays the ...
0
votes
2answers
416 views

How to filter URLs for embedded IMG tags?

This is a great presentation about Drupal security. They were talking about ways to only allow tags from certain trusted domains. Any ideas how to do that? I couldn't find a D7 module for that.
0
votes
4answers
690 views

Restrict access to text formats for certain role

For every user with role company manager i have made tab My company(in user profile) where user can see node_edit of their company(node). And i need to set default format to plain-text and hide text-...