Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Best way to disable syntax
Avatar
oz1cz #1
Member for 2 weeks · 3 posts · Location: Denmark
Group memberships: Members
Show profile · Link to this post
Subject: Best way to disable syntax
I need to disable a few of the syntax elements in the editor. (For example, I want to remove the syntax feature that formats ">" as a <blockquote> when the ">" is the first character on a line.)

What is the best way to disable certain syntax elements? Do I need to write a plugin that overrides the standard syntax?
--
Claus
Avatar
Michaelsy #2
Member since Jun 2015 · 697 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
The usual way is to use the no-formatting-tag for selective suppression of the wiki syntax:

<nowiki> ... </nowiki>
or
%% ... %%

https://www.dokuwiki.org/wiki:syntax#no_formatting
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
Avatar
oz1cz #3
Member for 2 weeks · 3 posts · Location: Denmark
Group memberships: Members
Show profile · Link to this post
<nowiki> disables all formatting. I only want to disable certain commands. Also I want to do it without changing the contents of the document. (The reason for this is that the documents are imported from an external source, and I really don't want to modify them.)
--
Claus
Avatar
Michaelsy #4
Member since Jun 2015 · 697 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
For this special use case, I assume you have to write a plugin.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
Avatar
turnermm (Moderator) #5
Member since Oct 2009 · 4490 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In reply to post #3
In the case of the blockquote you can remove the formatting with CSS.  See basic.less in tpl/dokuwiki/css
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
oz1cz #6
Member for 2 weeks · 3 posts · Location: Denmark
Group memberships: Members
Show profile · Link to this post
I can use CSS to remove the blockquote formatting, but then I need to reinsert the ">" using CSS or JavaScript, which is doable but tedious.

I have chosen to create a plugin that overrides the undesired formatting commands. I think that's the cleanest solution.

Thanks for your input!
--
Claus
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-02-16, 17:19:02 (UTC +01:00)