Loading...
 
Features / Usability

Features / Usability


Preserving "no processing" tags in a page?

posts: 38 United States

I recently migrated some pages from another Wiki to TikiWiki. As part of the migration, every page was wrapped with the "no processing" syntax, e.g.

~np~
ENTIRE DOCUMENT
~/np~

This was required because a lot of documents used ASCII box character, e.g. something like this:

+--------------+--------+ | Some text | + +--------------+--------+
Ok, the above isn't rendering correctly here, there should be line breaks. Not sure how to futz with the editor here to get it to work, so please imagine that there are actually three lines forming a visual representation of a rectangle with a divider in the middle.

Unfortunately, now that we are starting to edit these pages, we have discovered that the "no processing tags" which were used to prevent this text from being processed have been stripped, making it impossible to actually edit these documents - any attempt to do so apparently runs the page through a preprocessor which then proceeds to totally FUBAR the document by (for example) turning all these dashes into alternating strikethroughs of the remaining once. Even switching from WYSIWYG mode to SOURCE mode results from this transform being applied AGAIN so the contents of the page is being changed repeatedly during editing just due to changing the edit mode!

How can I prevent this from happening? I can't disable wiki-text completely, because then plug-ins won't render.
Thanks!

posts: 1563 Germany

Hi,

maybe using CKE WYSIWYG would not be the best idea in general.

Let's think about using WikiSyntax without WYSIWYG active at all.

I understand that you need ASCII boxes like that:

Copy to clipboard
+--------------+--------+ | Some text | + +--------------+--------+


Maybe you could work out some REGEX search and replace thingi and wrap the ASCII part in either CODE plugins or np tags loke that:

either replace

Copy to clipboard
+----- with {CODE()}+----- and -----+ with -----+{CODE}


or

Copy to clipboard
~ np ~ +----- with -----+ ~ / np ~

 

Edit: please mind that above I added spaces to the np tags, cause the np tags would not be non-parsed or correctly saved inside the CODE plugin.


So you would have the main parts of the documents free for plugin use and the ASCII part non-parsed.

Would that meet your requirements?

Regards,
Torsten

posts: 38 United States

No, unfortunately WYSIWYG mode is one of the requirements.

Looks like it may be off to the code to try to strip out the wikitext processing code then...


posts: 38 United States
For future reference to anybody who might find it helpful, what I wound up having to do was edit /var/www/html/lib/parser/parserlib.php and comment out all the transformations of wiki text. I also had to disable "Content is parsed like wiki page" (which WYSIWYG editing claims to require why?! but appears to work fine without)and replaced it with "Content is partially wiki parsed" which is needed for plugins to work.  Strangely, the latter appears to be "Neglected... can have unpredictable results and may be removed in future versions."  

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting