Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#42772 closed feature request (maybelater)

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

Reported by: theresajennings2011's profile 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
7 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
7 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
7 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
5 years 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.