Closed (fixed)
Project:
Ace Code Editor
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2016 at 20:17 UTC
Updated:
5 Jan 2017 at 08:04 UTC
Jump to comment: Most recent
Comments
Comment #2
cravecode commentedComment #3
cravecode commentedThe tag is parsed in the
ace_editorfilter's process callback and pushed to the page as JavaScript settings. The problem is that filters that are set "cachable", skip the filter's process callback if a cache was previously set. This results in the process that generates JavaScript settings to be skipped.I'm looking into a possible solution. I think the easiest approach is to turn off caching for this filter.
Comment #4
cravecode commentedI think I'm going to abandon this module as a syntax highlighter for published content. however, It's fantastic as an editor!
Current issues I see with this module's implementation for syntax highlighting of content:
<ace>tags with empty<pre>tags on server side.I suggest switching to use a
<code>block that gets rendered to the page regardless of syntax highlighting. This is better for SEOThen use Ace Editor to alter/style the content clientside.
If I get some free time over the next few weeks, I'll contribute a patch For now, I'll be using GeSHi
Comment #5
interdruper commentedCravecode, thanks for reporting, I can reproduce the bug.
Changing the "pre" tag to "code" seems easy, but the problem while refreshing/caching will require more work.
Any help/patch would be appreciated.
Comment #6
interdruper commentedOk, I have confirmed that JS cannot be added inside an input filter, because the filter caches the text and the function is never called again until the cache is next cleared. Currently the JS required from Ace is loaded inside hook_filter_FILTER_prepare(), that is the problem.
Let's find out the best way to fix this, work in progress...
Comment #8
interdruper commentedUnfortunately, by design, the only way for making this to work is disabling the filter cache for the ''Syntax highlighting' filter. If you use it, please note that since 7.x-1.8 release cache will be disabled for the content that has this filter enabled.