Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2014-08-11 03:45:32

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 190
Website

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:

!http://kuopassa.net/images/288t.png!:http://kuopassa.net/images/288.png

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

#12 2014-08-11 14:10:42

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,169
Website

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

#13 2014-08-11 14:23:24

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 190
Website

Re: kuo_ace: syntax highlighter for Textpattern

Hey, thanks for sharing that. The plugin should create a table called kuo_ace immediately after installing and activating it. (It’s used to save what theme, font size etc. you want to use.) I actually faced similar error messages and thought at some point it got fixed, and then I was like… Close enough.

Offline

#14 2016-03-02 08:01:02

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 190
Website

Re: kuo_ace: syntax highlighter for Textpattern

A new version is now available.

It has the same eight different color themes (four light and four dark) and the same options to choose what font size to use in the editor, but as well:

  • Ace can now be used in Body and Excerpt fields as well.
  • Also the Plugin Composer can use Ace.
  • Admin can choose to use wordwrap in the editors, if the active line is highlighted and if the search box is visible by default.

Last edited by kuopassa (2016-03-03 04:44:19)

Offline

#15 2016-03-02 15:29:54

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: kuo_ace: syntax highlighter for Textpattern

Thanks kuopassa !

  • Fine on pages and forms
  • Don’t work on my 4.6 dev for body/excerpt fields

Offline

#16 2016-03-02 22:00:50

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,416
Website

Re: kuo_ace: syntax highlighter for Textpattern

Nice work! As jean pol said (and you note on your site), the body/excerpt pages are all wonky on v.4.6. It seems to be the position: absolute; css but textile highlighting in the textarea doesn’t show if you correct that… would love to see it working on the write pane!


TXP Builders – finely-crafted code, design and txp

Offline

#17 2016-03-02 22:25:02

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,169
Website

Re: kuo_ace: syntax highlighter for Textpattern

I just tried to install this on a very fresh copy of Textpattern.

During the install, I got a dialogue box with:

User_Error "Table '[databasename].kuo_ace' doesn't exist"

When I clicked okay, the plugin is now on the list.

And then when I hit activate, everything seems to be working great.

Offline

#18 2016-03-03 02:48:45

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,639
Website

Re: kuo_ace: syntax highlighter for Textpattern

Same error michaelkpate above (in debug mode on my side):

User_Error "Table 'txp46.kuo_ace' doesn't exist"
in /Users/user/Sites/_txp/textpattern/lib/txplib_db.php at line 399.
adminErrorHandler()
textpattern/lib/txplib_db.php:399 trigger_error()
textpattern/lib/txplib_db.php:1057 safe_query()
textpattern/lib/txplib_db.php:897 getRow()
textpattern/lib/txplib_misc.php(1369) : eval()'d code:76 safe_row()
kuo_ace_foot()
textpattern/lib/txplib_misc.php:1898 call_user_func_array()
textpattern/lib/txplib_head.php:128 callback_event()
textpattern/include/txp_plugin.php:66 pagetop()
textpattern/include/txp_plugin.php:546 plugin_list()

Seems to behave well. One thing is terribly annoying on the Pages panel (seen in Safari and Opera, but not Firefox for some reason): the JS attempts to flag invalid HTML code, and puts a little 'x' in the line numbers column, on hover you get a very unhelpful message flying out. “very unhelpful” because the message is completely bogus, in the context of Texpattern page templates.

Offline

#19 2016-03-03 04:46:47

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 190
Website

Re: kuo_ace: syntax highlighter for Textpattern

Thanks everyone for the feedback, it’s very helpful stuff. :-) All those issues you mentioned should now be fixed. I’ve updated download links for the plugin to previous posts so that they point to version 0.4.

It can be downloaded from here as well.

Offline

#20 2016-03-04 08:38:38

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: kuo_ace: syntax highlighter for Textpattern

I want to modify the CSS of the textile themes. Could you explain where to go ?

Offline

Board footer

Powered by FluxBB