Loading...
 
Skip to main content

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
(0)
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 Image
Copy to clipboard
…
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.





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:

Image
Copy to clipboard
$data = preg_replace("/\^([^\^]+)\^/", "<div class=\"simplebox\">$1</div>", $data);


to …

Image
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)Question 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+
Demonstrate Bug (older Tiki versions)
Ticket ID
2278
Created
Saturday 31 January, 2009 00:20:04 UTC
by Unknown
LastModif
Monday 25 May, 2026 13:24:39 UTC


Show PHP error messages