Quicktags simplebox assign from single caret to double to allow for more elements inside
- Status
- Closed
- Subject
- Quicktags simplebox assign from single caret to double to allow for more elements inside
- Version
- 2.x
- Category
- Usability
- Feature
- Toolbars, Quicktags and Smileys
WYSIWYG (What You See is What You Get)
Wiki Syntax (text area, parser, external wiki, etc) - Resolution status
- Invalid
- Submitted by
- G.Obarkley
- Lastmod by
- Ushindi Gedeon
- Rating
- Description
The tiki normal editor has a problem when a page uses multiple carat elements. It creates unwanted boxes. i.e 10^¹¹ used twice would create a malformed simplebox breaking the natural math operators into unreadable divisions.
The
is not a workaround as this creates an unwanted space after the carat and before the next character. It is also awkward. It also does not allow the natural use of an otherwise perfectly suited math symbol.Copy to clipboard…
- Solution
The best result is IMHO to use double carats as beginning/ending delimiters for the simplebox css definition (programmed as "simple-wiki" in the tikilib.php control file.
So, the fix (i.e. hack) that was created by a nonprogrammer on our team was the following:
To change one line in tikilib.php from:
Copy to clipboard$data = preg_replace("/\^([^\^]+)\^/", "<div class=\"simplebox\">$1</div>", $data);
to …
Copy to clipboard$data = preg_replace("/\^\^([^\¨]+)\^\^/", "<div class=\"simplebox\">$1</div>", $data);
Note that the character just before the end square bracket is an Umlaut (diacritic)
typesetting character (virtually never used on its own—at least to my understanding). We are not programmers, and can only guess that the area where the Umlaut was used to test for additional carat elements as the original definition would not allow for carat characters to occur within the simplebox definition.
Note that this solution allows for multiple css / html elements all to be successfully enclosed in one longer box (haven't tested embedded images though).
Suggestion: Review the hack/fix; determine if this breaks anything. Else redefine the simple box from one carat to two carat delimiters as this will allow simple math functions and other carat usage. Review the hack to ensure that the internal area (where the umlaut lives) is consistent with PHP and wikitiki objectives.
Hope this can be included as an update, as the carat is too important feature to be dropped from normal usage.
(Also, as there is no PREVIEW MODE here, I will just take my best guess as to formatting of this submission. If it is not readable, please e-mail me at:life(dot)of(dotagain)ryli(atsign)gmail(domaindot)com
- Workaround
- Importance
- 4
- Priority
- 20
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2278
- Created
- Saturday 31 January, 2009 00:20:04 UTC
by Unknown - LastModif
- Monday 25 May, 2026 13:24:39 UTC