Hi …question, if I understood it right, I can select a string, type ex. “p”, press TAB, and have the string wrapped with p-Tags? However, the selected string gets deleted if I’m doing that. How can I fix that? Version is 3.2.2.
Wrap text with tags ain't working?
after that, the selection region will be replace with plain text “p”.
I used alt+shift+w
but not sure whether this is from built-in or a plugin.
That’s default functionality; it’s available from the main menu at Edit > Tag > Wrap Selection With Tag
.
The binding is alt+shift+w
on Windows and Linux and ctrl+shift+w
on MacOS (but the binding is visible in the menu as well).
Yes, but if I use WrapSelectionWithText (either via Edit > Tag > …, or via alt+shift+w) how can I change
the default p-Tags to other tags? And, if possible, how can I choose any tag I like while typing?
When you press the key and the text is wrapped, the default tag is <p>
, but whatever you type becomes the tag. So, just type whatever tag name you want (just the name, not the <
or >
) and both the open and the close tag will update.
Works perfect! I don’t know what kept me from seeing that solution … anyway, thank you very much, OdatNurd!