Loading...
 
Features / Usability

Features / Usability


Preserving "no processing" tags in a page?

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!

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:

+--------------+--------+ | 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

+-----
with
{CODE()}+-----
and 
-----+
with 
-----+{CODE}


or

~ 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

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...


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

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.