How to customize the emacs plugin called hl-tags-mode - emacs

After switching to Emacs for editing purposes, I have started missing the way Notepad++ does tag highlighting.
When I move the caret/cursor to an HTML tag, the opposite end of the tag should be highlighted.
The Emacs plugin called hl-tags-mode does this, but how can I change it so that
the highlighting happens only when cursor is at an
HTML tag. Right now the plugin highlights even when cursor
is inside some plain text inside a parent tag.
Only the opposite end should be highlighted.
So if I'm at a <div> tag, only the matching </div>
should be highlighted. And vice versa.

show-paren-mode would probably be the right mode for that, but it currently doesn't do it for HTML tags. Try M-x report-emacs-bug asking for that new feature.

Related

How to cancel focus() of Grav build-in CodeMirror editor

I would like to add my custom WYSIWYG-editor with my plugin over Grav build-in editor without removing the last.
I append my editor as a divider with contenteditable="true" to .CodeMirror-lines > div as the container where is also build-in .CodeMirror-code editor divider. And my editor is above as layer (z-index is higher).
But when I click the area, the build-in editor is focused and not mine.
I've viewed the codes of both user/plugins/admin/themes/grav/js/admin.min.js and user/plugins/admin/themes/grav/js/vendor.min.js to find the row(s) which is(are) responsible for such focusing, but I can't.
Could someone help to cancel this focusing?
Ok, to resolve the problem it's enough to append my editor not to .CodeMirror-lines > div, but to .grav-editor-content divider

CodeSandbox editor has stopped auto completing the corresponding JSX closing tags?

CodeSandbox editor used to auto generate the corresponding close tag for the current tag.
For example:
<div> // THEN IT WOULD AUTO GENERATE THE </div> TAG
But don't know exactly when, it stopped doing that, and I have to write it manually. Is there a way to enable this autocomplete again?
In the codesandbox.io go to:
File -> Preferences -> Settings
In the Search Settings box type Javascript Autoclosing Tags.
Enable that feature by checking the Checkbox.
Just posting an updated answer since the UI has changed for codesandbox. I believe this answer is now slightly better:
Press cmd+, (ctrl+, on a windows) with the editor focused (this opens the vscode settings)
You should see a settings page like so:
In the Search Settings box type Javascript Autoclosing Tags
Toggle the checkbox on
In my case the auto completion works if a change the extension of the file to .jsx and if I start typing the tag without the <.

Customize TinyMCE Code Editor

I use TinyMCE (with react-tinymce moudle on npm). I need to customize the HTML code editor, so that it looks like the one on Wordpress. I think it should be possible as Wordpress use TinyMCE.
What makes the editor on Wordpress comfortable is we don't need to enter <br> or <p> on code editor. But when we switch to visual mode, it will add <br> or <p> automatically. That makes the text looks much cleaner and easier to read.
Another question is how to make the code editor not displayed in a popup. The main problem with the popup is it will be closed when we accidentally press esc or the cancel button. In addition, the Wordpress code editor also has a toolbar, while the default TinyMCE code editor is just a textarea on a popup.
The code plugin that comes with TinyMCE places the HTML code is a separate window - there in no configuration option that will allow the code to appear directly in the editor's main window.
If you'd like to submit this as a feature request, TinyMCE has a place for that:
https://community.tinymce.com/communityIdeasHome

How to prevent the cursor in tinymce editor?

I am using TinyMCE editor,
http://beyondthelogix.com/demos/editordemo/demo.html
When I click on the equation symbol in the toolbar,an editable span is automatically created with a class 'AMedit' in the editor.
Now my question is: if the cursor is just after the ending single quote of this span,that <span class="AMedit">'some text'</span>,
The backspace key should not work. More simple, once the cursor is outside this span, the backspace key should not move it back to the span.
This will not be a single span,this span is created everytime we click the equation symbol in the toolbar.
You can check it live. I have noted the link above.
So if you guys have some idea about this, Please help me in this.
Thanks to All!

Customize face for HTML headers (h1, h2, etc)

I am very new to emacs and despite the great online documentation I can't figure out how to customize the face applied to the content between HTML header tags (e.g. <h1>Content here</h1>), so that the content is not displayed underlined nor bold in emacs. In other words, I would like such content to be displayed with no ornament at all, as pure default text.
In a general manner, how can syntactic-based (not keyword-based) highlighting be customized ?
Does anyone know how to proceed ?
it depends on which mode is used to edit html files. But basically, you can put cursor to text, and execute M-x customize-face - Emacs will ask for name of face (font+color+...), and by default it substitutes the name of face for text under cursor, so you can simply press enter. After that, Emacs will open new buffer where you can edit parameters. After that you can press "Apply" (to set only for current session), or "Save" to save these parameters into file with settings.