Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 228
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: 228
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
Registered: 2004-10-01
Posts: 752

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: 4,578
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,379
Website GitHub Mastodon

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: 3,058
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.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

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

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 228
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
Registered: 2004-10-01
Posts: 752

Re: kuo_ace: syntax highlighter for Textpattern

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

Offline

#21 2016-03-05 11:43:50

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

Re: kuo_ace: syntax highlighter for Textpattern

Uhm, I don’t quite understand your question. Please expand it a bit. :-)

Offline

#22 2016-03-05 12:44:07

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: kuo_ace: syntax highlighter for Textpattern

I want to improve the readability of the textile tags for the user. Put a little background color or a text color more visible.

Offline

#23 2016-03-05 17:10:23

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

Re: kuo_ace: syntax highlighter for Textpattern

I might code a feature for custom CSS or something, but meanwhile you can modify the plugin’s source code. You should find this place:

});
});
</script>

Then you can change it to:

});
$(".ace_editor").css({"background-color":"white","font-size":"200%"});
});
</script>

That way you can insert CSS with jQuery to the .ace_editor selector.

Offline

#24 2016-03-05 17:58:49

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: kuo_ace: syntax highlighter for Textpattern

Thanks ! I ll investigate this way !

Offline

Board footer

Powered by FluxBB