Hi,
I am not sure why you said “never mind” so I am still going to answer. As with WordPress in general, you have the visual editor and text editor that displayed code. It’s still the same – just click on the “Text” button to enter text editor and you will start using Synchi instead of the default editor.
Cheers.
Thanks for reply. But Synchi doesn’t fully work in my wp.
After activating the plugin, when I try to make a new page.
In “text” tab, I wrote like this:
[php]
$wdwd = ‘wd’;
if (2 == 2) {
echo ‘wdq’;
}
function test() {
return 10;
}
[/php]
The color of whole text is black. Only brackets ( (), {}, [] ) turns to green only if I click on one of a pair.
[php][/php] is not a standardized syntax for IDEs. The correct PHP tags are: <?php /*code*/ ?> (http://www.php.net/manual/en/language.basic-syntax.phptags.php). That editor was not intended for PHP code in the first place – you are probably using a plugin that enables you to run PHP code inside your post content. Synchi is doing syntax highlight for HTML code but I think it should also work for – proper – PHP tags.
As a lot of people are using the plugin called “Allow PHP” so it would be great if synchi also highlights code inside of [php][/php]
Can I manually add additional snippets?
Unfortunately, when it comes to syntax highlighting (and most of the features) in Synchi, it is 100% dependent on CodeMirror (http://codemirror.net/). So, yes – you can – provided that you fork the right version of CodeMirror and extend it. But, that really looks like too much effort for something so simple. So, I would guess using <?php ?> since it will be removed after clicking “Save” – while you are editing using Synchi.
Using temporary <php sounds good to me. Thank you for your advice. And thank you for the great plugin
Here’s how I see it working (hopefully):
<?php [PHP] /* code */ [/PHP] ?>
Thank you for your feedback.