My requirement is very simple.
I want to add some html in a static page body.
I created a content type called Page.
I am adding HTML text into the body.
HTML is saved in database correctly.
But when I saw the same in front end it is showing HTML.
I am new to Drupal, But have 6 years of experience in php.
Please give me a solution.
It is problem with your text format settings. You can select different text format every time you make content and you can set up default one for every content type. Make sure you using text format which you set up for proper content display:
Assuming you are using "Full HTML" text format go on:
admin/config/content/formats
Click configure and make sure you turn off option display HTML as plain text:
Hope this helps.
I think you need to specify text format type.
Could you find text format area in content edit page?
If you want to display as html page, you need to specify "Full HTML" in text format area.
Related
On my content type form I am trying to change the placeholder text from "Title" to "Subject". My field setting is as below:
This change gets updated correctly but the form title still shows as "Title" :
Unsure why it's not reflecting. Cleared cache and tried on incognito windows. no luck. Any help on how this can be fixed pls?
Make sure you are setting on the correct content type and don't forget to hit Save button at the bottom of the Manage form display page.
If you have done all the above and still not solved the problem then somewhere in your code has overwritten the placeholder configuration of that field. In that case you need to find and remove it.
I'm using USP-Pro to let users post to a Wordpress blog. I have a textarea input in which they should put the main post content - the one that appears in the Wordpress admin editor. I'd like to keep the text formatting once they submit the form so I'm using CKEditor for that textarea.
CKEDITOR.replace('usp-content');
Checking the textarea with Firebug while I input the text shows that there actually is some HTML code inside, but when the form is submitted, in the editor I just see the raw text, without any formatting, which is pretty annoying because I lose all the spaces, the new lines and so on.
EDIT:
After various attempts I discovered that the problem is in the Wordpress function wp_strip_all_tags, inside the file wp-includes/formatting.php. I tried to comment it and it actually posted the content correctly with all the html in place.
Of course I can't just comment the whole function. How can I tell Wordpress to not use it when submitting such posts?
I'm having trouble displaying the body text when creating a Basic Page. I've somehow deleted the body field at some point and then tried to add existing field again.
Now that I've added Body field again and typing in some text in the body for a Basic Page, it won't appear on my page. I can see my text in body_value in myphpadmin in field_data_body and my page is only displaying the title.
I've tried several things. Cleared cache, reapplied all template files (page.tlp.php etc.)
Im using Drupal 7.
Any help appreciated
How can I alter / expand the whitelist of permitted tags for "Limited HTML" in Drupal 7's editor?
Or, what may or may not be the same question:
On http://ludditeorthodox.com I have a block of text which I would like to precede with an image. As noted on another question, I copied and test-modified page.tpl.php to page-front.tpl.php, but the test <div style="background-color: silver"> was not showing up on the homepage. Given that the homepage is presently displaying a basic article as desired, what is the best way for me to add an image above the article text?
TIA,
To answer your question directly:
Configuration > Content Authoring > Configure (the format)
At the bottom under "Filter settings" there should be a list of allowable HTML tags. Just add in
For a better solution:
Create an image field and display that above the text. The advantage is that Drupal will handle the uploading and storing of the image.
or install the following modules.
http://drupal.org/project/wysiwyg
http://drupal.org/project/media
The best way to add an image above the article text is using an extra field of type "image" and configure the display to be above the text field.
My issue is I have a drupal site and I am trying to create a Make Payment page. I was able to create the page but the issue I ran into is when I got the code for the button from PayPal and inserted it into the CKEditor. The CKEditor works when I put it in there but it wont publish.
Any tips would be helpful.
You probably have to set the Input Format for that text box to "Full HTML". Otherwise a lot of the HTML tags will be stripped out when it is displayed.