WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 11 months ago

#42772 closed feature request (maybelater)

Have a way to turn off autocomplete of tags in Custom HTML widget

Reported by: theresajennings2011 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9
Component: Widgets Keywords:
Focuses: Cc:

Description

So, I copy and paste text into the Custom HTML widget. Oh, looks like I'm going to need to apply some tags. I'm used to hand-coding my stuff. So I go to enter an opening <p> tag, and it autocompletes. But I'm trying to wrap a paragraph already there. I don't need the tag autocompleted, because the closing tag isn't in the right place. This just makes a little more work for me because the autocomplete is also adding a space. I don't need the space. I have to remove it.

Ex:

<p>

</p>
dflgkjfglk;jglkfbjgkl;hjgk;bj;fgkhjbklgfbfglkhjtoihjmz/m,bnfgs/lhnbkndzfbln/ldngkm

I'm suggesting there be a way to disable autocomplete of tags - maybe a checkbox in the widget - at the top of the widget.

Change History (4)

#1 @westonruter
3 years ago

  • Keywords reporter-feedback close added
  • Version changed from 4.9.1 to 4.9

If you want to disable autocomplete, you can do so with a plugin for example:

<?php
add_filter( 'wp_code_editor_settings', function( $settings ) {
    $settings['codemirror']['autoCloseTags'] = false;
    return $settings;
} );

#2 follow-up: @westonruter
3 years ago

  • Keywords reporter-feedback close removed
  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

If this becomes a need more users have, it can be reconsidered for core. Otherwise, I suggest developing a plugin to add this.

#3 @AndrewKantor
3 years ago

I second this. It's incredibly annoying, especially as it's a relatively new widget and even suggests that users migrate to it from the standard text widget. If you do migrate, you're likely to need to edit the text, not write from scratch.

Not only is the forced autocomplete annoying, as soon as you start to type the closing tag it autofills it. So I end up with <p>Whatever text</p>p> because I'm typing that closing tag.

(Honestly it's a great idea, just a poor implementation. It only works well if you're typing from scratch, not if you're looking to re-use content. It needs a way to turn of autocomplete.)

#4 in reply to: ↑ 2 @Tharkon
11 months ago

Replying to westonruter:

If this becomes a need more users have, it can be reconsidered for core. Otherwise, I suggest developing a plugin to add this.

Great fix, though bit disappointing that a plug-in would be required for a bug that has been known for this long.

Note: See TracTickets for help on using tickets.