Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
kuo_ace: syntax highlighter for Textpattern
kuo_ace
activates Ace for Textpattern’s Articles, Sections, Forms, Styles and Commets — if you want to. This initial release has Ace’s default colour scheme and it uses html
syntax highlighting in Sections and Forms, and css
for Styles section. Tested with Textpattern 4.5.5.
If someone would like build a specific Textpattern “mode” (read more), please let me know about it — it’d be great to include that for the next version of this plugin.
Last edited by kuopassa (2016-03-03 04:44:02)
Offline
Re: kuo_ace: syntax highlighter for Textpattern
It does work … but does it realy need all 9,3 MB (9.335.564 bytes) .js files?
Offline
Re: kuo_ace: syntax highlighter for Textpattern
No, I suppose you are right. :-) There could be some extra JavaScript included. I’ll try to figure out what files are the minimum requirements for this plugin.
Offline
Re: kuo_ace: syntax highlighter for Textpattern
I see that Ace also supports Textile.
mode-textile.js
It would be cool if there was a way to use it on Content forms.
Offline
Re: kuo_ace: syntax highlighter for Textpattern
Offline
#6 2014-08-09 20:11:58
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: kuo_ace: syntax highlighter for Textpattern
Sorry for the question, maybe I seem to be an ignorant, but, what is a “content form”?
Offline
Re: kuo_ace: syntax highlighter for Textpattern
GugUser wrote #282775:
Sorry for the question, maybe I seem to be an ignorant, but, what is a “content form”?
I was thinking of the Body and Excerpt Fields on the Write Tab. “Content form” probably isn’t the best way to describe them. :)
Offline
#8 2014-08-09 22:11:51
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: kuo_ace: syntax highlighter for Textpattern
Oh, yes.
Offline
#9 2014-08-10 09:00:18
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: kuo_ace: syntax highlighter for Textpattern
Thanks, usefull plugin !
+1 for the textile mode, and maybee a Textpattern mode based on HTML.
I try it on HIVE, on 4.6, last nightly build, and there is a problem with the with of the textarea (100% of all the screen, and not the same with of the replaced textarea)
Offline
Re: kuo_ace: syntax highlighter for Textpattern
It’s possible to lighten the .js load on your own server by outsourcing to a CDN, perhaps:
Offline
Re: kuo_ace: syntax highlighter for Textpattern
Thanks everyone! It’s nice to get so much valuable feedback. :-) The next version has more features based on your ideas and observations. The download link is the same. Here’s a new screenshot of the settings page where you can switch theme, select which sections use Ace and what font size the editor has:
gaekwad: Exactly! It’s now fetched from CDN (jsDelvr), so users can put this plugin at work simply by activating it. No need for 9.3 megabytes of JavaScript files. :-)
jpdupont: Thanks for informing about that. Similar problem is with nightly build of 4.6 with all the admin themes, it seems. I coded a fix for that, which should activate automagically when Textpattern’s version number is higher than 4.5.5. Currently it looks like nightly build for 4.6 has actually version number 4.5.4 under the hood, so this fix doesn’t work just yet.
Last edited by kuopassa (2014-08-11 03:46:22)
Offline
Re: kuo_ace: syntax highlighter for Textpattern
Update: As I suspected, disabling and reenabling solved the issue.
Installed the upgrade and got the the error below when I went to the extensions tab http://…/textpattern/index.php?event=kuo_ace
Internal error "Table 'dredr9xe.kuo_ace' doesn't exist"
in /home/.../...textpattern/lib/txplib_db.php at line 95.
adminErrorHandler()
textpattern/lib/txplib_db.php:95 trigger_error()
textpattern/lib/txplib_db.php:296 safe_query()
textpattern/lib/txplib_db.php:235 getRow()
textpattern/lib/txplib_misc.php(812) : eval()'d code:226 safe_row()
I’m sorry. I’m afraid I can’t do that; kuo_ace is an unsafe operation.
Offline