Closed Stikus closed 1 year ago
This is unfortunately how Wrap works: it handles the <div>
and <span>
tags, along with its own <WRAP>
, <wrap>
, <block>
and <inline>
tags. If both, Ad-Hoc Tags and Wrap try to handle the same tags, it is a bit unpredictable which one wins... so you shouldn't use these tags in this plugin if you also have Wrap installed.
The option in the Wrap configuration only determines which tag is used if you insert a tag via the menu, it doesn't do anything about the parser. So that doesn't really affect the problem here.
However, because of this issue, I have also added another plugin, called (fittingly) “Ad-Hoc Wrap”, which does the opposite: it adds the <WRAP>
, etc. tags to Ad-Hoc Tags and defines block, colour and layout classes to replace the ones in the Wrap plugin. There is also a demo page that shows you how that looks like (note that the "look and feel" is quite a bit different from what you get from Wrap) – have a look, maybe this would be an alternative for you.
Edit: here is also a link to the Plugin Page.
Thanks for answer, WRAP option on my language doesn't have any info about toolbar picker - that's why I was confused.
Now I see this part on plugin page:
For example, you may want to disable the <span> and <div> tags, if you are also using the Wrap plugin, as there might otherwise be a conflict between these two plugins.
But due to conflicts
missing - I thought that only Ad-Hoc Wrap conflicts with WRAP, not Ad-Hoc Tags.
Can you give me advice - IIRC I can use <a>
tag without href
attribute as span replacement inside <pre>
tag for my purposes?
Well, there is not really conflict: Wrap and Ad-Hoc Tags can both be installed and used in parallel – it is just that two tags in the latter won't (or rather: may not!) work as intended, if activated (also a reason why they are not active by default).
As for using the <a>
-tag: I would not recommend using tags for anything that they are not intended for - otherwise you may run into other problems: for example, a screen-reader may try to interpret the element as if it was a link, and behave in an unexpected way.
However, there are still some other tags that may be alternatives: <section>
is a block-level, well, section of the page, and <aside>
marks a block that is not part of the main flow of content. In my websites, I use markup like <aside info>…
a lot, to make a "side-note", i.e. something that gives additional information, but could also be skipped (except that the "info" class adds a nice big blue frame and an icon to it, so it is really hard to skip :-)
Finding replacements for <span>
is a bit harder, but <bdi>
can probably be used in situations where a self-contained expression is to be wrapped in a tag. At least I can't think of any adverse side-effects of this.
Big thanks for answer, I'll try <bdi>
next time.
If you think there is no conflict with wrap - I'll close issue.
Thanks for implementing
<pre>
tag. I start testing and found issue with WRAP'sspan
implementation, but due to missingconflicts
field on plugin page, I've decided to create this issue.I'll create an issue in WRAP if you think that problem located there (I'm not sure for now).
Test code:
When WRAP is enabled -
<span>
styles don't work:When WRAP is disabled - all ok:
plugin»wrap»syntaxSpan
is selected aswrap
but due to this explanation of this option on plugin page:Which syntax should be used in the toolbar picker for inline wraps?
I'm not sure - should WRAP use onlywrap
tag (notspan
orinline
), or it should usewrap
tag only for toolbar