I have more than 200 records (nodes) that need a field to be changed from plain text to full/raw html (there is a link in there). Is there a way to 'bulk' do that without having to edit every single node?
If you use the Execute PHP function in the Devel module, you could probably write a loop that goes through each of the nodes (are they all the same content type or is there some other common factor to identify them?) and run something like this:
Another option is to use the Views Bulk Operations module. It provides the operation "Modify entity values". When you choose this operation for your content items, you can select the text field and change its format to Raw HTML.
edit: Attention, please do NOT follow the instructions above. If you do so, the format will be changed, but the content of the text field will be removed.
Wait, I made a serious mistake in my last comment, please don't follow the instructions there. If you do so, the the content of the text field will be removed. (I've updated the comment accordingly.) Sorry for the mistake!
I 'found' an even simpler way - brute force, but fine at this site. Edit 'plain text' to allow html 'things' - i.e. set plain text the way raw html is set.
One word of caution @Egmund, 'plain text' is intended to be a safe format for visitors where you don't want any formatting and also a fallback option. Doing this change may be ok if you never use (AND never will use) plain text for untrusted users.
It could also be confusing if there are any other site editors having a plain text format with lots of markup.
Thanks, I see! So you're trying the same method as I did. At the moment, I don't have ideas why it should fail on your site. Maybe have a look at the database log (admin/reports/dblog)?
Posted3 hours 29 min ago by Olaf Grabienski (Olafski) on:
Hi @dyrer, I've just updated one of my sites from Backdrop 1.29.0 to version 1.29.1, using the built-in update functionality at the page admin/config/system/updates. I was able to update without...
Posted3 hours 44 min ago by Olaf Grabienski (Olafski) on:
I got this additional hint in Zulip:
Hint: Themes are a bit different. They can ship with a screenshot.png, which doesn't need any adaptions in the readme - they display on B-org...
You can also use HTML which is useful if you want to size, position or otherwise style the image:
<img src="https://raw.githubusercontent.com/backdrop-contrib/bee/1.x-1.x/images/bee.png" align="...
Posted1 day 5 hours ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:
Comments
If you use the Execute PHP function in the Devel module, you could probably write a loop that goes through each of the nodes (are they all the same content type or is there some other common factor to identify them?) and run something like this:
I've used the body field as an example but would work with a bit of adjustment for other text fields.
Another option is to use the Views Bulk Operations module. It provides the operation "Modify entity values". When you choose this operation for your content items, you can select the text field and change its format to Raw HTML.
edit: Attention, please do NOT follow the instructions above. If you do so, the format will be changed, but the content of the text field will be removed.
Wait, I made a serious mistake in my last comment, please don't follow the instructions there. If you do so, the the content of the text field will be removed. (I've updated the comment accordingly.) Sorry for the mistake!
I 'found' an even simpler way - brute force, but fine at this site. Edit 'plain text' to allow html 'things' - i.e. set plain text the way raw html is set.
Bingo - instantly all records 'fixed.
One word of caution @Egmund, 'plain text' is intended to be a safe format for visitors where you don't want any formatting and also a fallback option. Doing this change may be ok if you never use (AND never will use) plain text for untrusted users.
It could also be confusing if there are any other site editors having a plain text format with lots of markup.
I am aware of this - and the site is closed except for 'informed' editors. I would not do this on a site expecting comments for instance.
There seemingly is no way to force a field to be raw-html - otherwise that would be the preferred solution.
You can make the default for a field be raw html if you like:
You can also disable other formats (except plain text)
Sorry I am a little lost here. Where am I when 'adding a couple of characters'?
Go to admin/structure/types/manage/content_type_machine_name/fields/field_machine_name/edit
Yes seems to be able to change it that way. But already imported records are not changed.
Not that big a deal - I have to re-import anyway.
Thank you for your help.