Is it possible to place [[Wayfinder]] into the TinyMCE contentfield but don't let modx do anything with this just show and not process it?
(So I can use syntaxhighlighter on front-end)
Just like this forum I can do below without loading the wayfinder navigation or chunkcode:
[[Wayfinder]] {{mychunk}}
[ed. note: fourroses666 last edited this post 12 years, 10 months ago.]
Evolution user, I like the back-end speed and simplicity

yea like a tut, seen that post, still looking for a solution
Evolution user, I like the back-end speed and simplicity

Quote from: Jako at Nov 08, 2013, 05:11 AMhttp://modx.com/extras/package/notparsemodxtags
Thanks will try that
Evolution user, I like the back-end speed and simplicity

It works for
<pre> but I use syntaxhighlighter and need a different
<pre> class.
<pre class="brush php"> and <pre class="brush css"> and <pre class="brush xml">
The plugin needs to be modified:
function replace_modxtags($matches){
global $modx;
$code_entities_match = array('[', ']','{', '}');
$code_entities_replace = array(
'<span class="bracket">[</span>',
'<span class="bracket">]</span>',
'<span class="bracket">{</span>',
'<span class="bracket">}</span>',
);
$code = str_replace($code_entities_match,$code_entities_replace,$matches[1]);
return '<pre>'.$code.'</pre>';
}
$modx->documentObject['content']=preg_replace_callback("#<pre>(.*?)</pre>#s", "replace_modxtags", $modx->documentObject['content']);
I tried to add:
return '<pre class="brush php">'.$code.'</pre>';
Any idea?
Evolution user, I like the back-end speed and simplicity

I made a typo, its needs to be class="brush: php...
But still can't get it to work.
<pre> works with the old code but as soon as I use <pre class="brush: php"> the modx call is blank.
when I use your line of code the <pre> and <pre class="brush: php"> don't work.
it wants to parse the modx tag [[Ditto?..
maybe these two are conflicting each other. (syntax highlighter and notparsemodxtags).
Evolution user, I like the back-end speed and simplicity

-
☆ A M B ☆
- 1,031 Posts
Is syntax highlighter a plugin too?
I use Syntax Hightlighter which isn't a snippet/plugin at all.
Thought it was a plugin but isn't (it was installed by a colleague)
https://github.com/alexgorbatchev/SyntaxHighlighter
Evolution user, I like the back-end speed and simplicity
