More formatting options in the editor

Is it possible to increase the functions for the editor? Would like to include a few more possible but not as many as what would be here: https://richtexteditor.com/

image

This is all I am getting with the user input. Mess something up on my end?

I would like the same

Please let me know which extra formattion options are required. If you checked the editor option for a Textarea attribute the editor is pretty basic because it doesn’t allow any dangerous HTML tags. It’s possible to customize the editor toolbar, but this requires filtering the hivepress/v1/fields/textarea field parameters with a code snippet.

Yea i didnt think about that. I dont want them to be able to add links. So def not the link icon. Everything but that.

What i would need really is the insert table icon. Basically it would create an easier solution for my hosts to put their host rules or other info items in an organized way in the listing description.

Thanks!

*Actually a better solution for me ihor or hivepress support team, if possible can you give me access to the insert code icon on that editor? Then if it is not asking for too much then I would just need any simple code (in any computer language) for an accordion to put in the insert code. This would make it so much easier for my host to put their host rules, parking situation, etc.

Please try this PHP snippet to start. It deletes some formatting options in the editor but it is possible to use this code snippet to add more formatting options. If you are not familiar with code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY

add_filter( 
	'hivepress/v1/fields/textarea', 
	function ($field_args, $field){
		$html = hivepress()->helper->get_array_value($field_args, 'html');
		
		if(!$html){
			return $field_args;
		}
		
		$field_args['editor'] = [
			'toolbar1'    => implode(
				',',
				[
					'italic',
					'underline',
					'strikethrough',
				]
			),
			'toolbar2'    => '',
			'toolbar3'    => '',
			'toolbar4'    => '',
			'elementpath' => false,
		];
		return $field_args;
	}, 
	1000,
	2
);
1 Like

I figured out these names to insert and add into the code snippet:

'bold',
					'italic',
					'underline',
					'strikethrough',
					'indent',
					'outdent',
					'cut',
					'copy',
					'paste',
					'forecolor',
					'insert',
					'undo',
					'redo',

What is the correct name for the Table? Bulleted list? Ordered list? Insert Code? I’m missing these.

Does anyone know where I can get the list of all the correct names of the items that I can add to the editor via this snippet?

Here is a list of the built-in buttons: bold, italic, underline, blockquote, separator, strikethrough, bullist, numlist, justifyleft, justifycenter, justifyright, undo, redo, link, unlink, fullscreen

But please note that it can require further research to find other possible buttons

1 Like

Thanks yevhen,

I found most of those, but what I really really needed was the editor button to either 1) insert a table or 2) insert a code. I haven’t been able to find it :disappointed:

Sorry for the inconvenience, but it requires advanced research

If customizations are required for your site, please try to check some developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY