Search

Symphony.WEBSITE. Is that documented?

Not documented per se, but take a look inside symphony/assets/admin.js at the Symphony object definition and you’ll find the WEBSITE constant at the top.

I guess that’s where I found it. :-) I used it for the Safari Uploads extension.

The tabkey works. […] As far as I see, codemirror’s indentation will always be “space”-based, not “tab”-based.

Ah ok. Bugger, I like tabs more than spaces. :-)

Great extension, thanks for it.

I just have one issue: Each time I type a slash character (“/”) anywhere in the line, it puts four spaces at the beginning of the line. Is it a bug or a feature?

This extension seems to work well in Symphony 2.1.2. I do not know where else to ask for updating the Compatibility…

— mjf

I get this massege when i upload the codemirror folder:

Fatal error: Class 'extensionoleae-codemirror' not found in /home/duhpcne/publichtml/assistencia/symphony/lib/toolkit/class.extensionmanager.php on line 634

can enybody help?

If you check in the extension driver file to see if the foldername is the same as the extension classname, that may be the problem.

The folder needs to be the same name.

The problem was actually the folder name wich should be only "codemirror" and not "oleae-codemirror", i have to rename the folder when i download from github.

Thanks a lot.

Still working like a charm in Symphony 2.2.5, and very useful.

It seems that's there is a V.2 of Code mirror, codemirror2

May be an idea to adapt it for symphony like Oleae had done before.

Error console:

/xampp/symphony/symphony/blueprints/pages/template/home/undefined/extensions/codemirror/assets/js/editor.js/undefined/extensions/codemirror/assets/js/parsexml.js/:1Uncaught SyntaxError: Unexpected token <

Need some advice to fixed the broken code.

As of S2.3, Symphony.WEBSITE constant has been replaced by `Symphony.Context.get('root')'.

This extension doesn't appear to be working in 2.3

Could someone confirm?

[Update: Seems to be working today, oddly enough, maybe it was a cache issue.]

Ok so the extensions seems to work; however if there are more than 100 or so lines of code it doesn't load anything. i.e. I need to go and turn off the extension to be able to access the content.

Haven't noticed this before with codemirror, so assume it's extension specific.

I did add a bug on GitHub but I'm not sure if anyone's maintaining this anymore?

EDIT: Actually I'm not convinced it's the length of the code - it might be something else that's tripping it up, but either way it seems to fail quite regularly.

I have the same problem as you @nathanhornby, I think the issue occurs when you have some javascript in the code... this is the offending piece of code that seems to break the extension and fail to show anything in the field:

&lt;script type="text/javascript">
$(function() { 
$('.main_content, .main_navi').hide(); 
$(window).load( function() {  
$('#loader').fadeOut();
$('.main_content, .main_navi').fadeIn(2000); 
} );
} );

$(document).ready(function() {
$("body").css("display", "none");

$("body").fadeIn(2000);

$("a.transition").click(function(event){
    event.preventDefault();
    linkLocation = this.href;
    $("body").fadeOut(1000, redirectPage);
});

function redirectPage() {
    window.location = linkLocation;
}
});
&lt;/script>

@alexdonal Unfortunately that's not a factor where I've seen the issue as I don't have any inline JS where it's failing - however there is a chance that it's tripping up on something specific that's shared between my code and yours - a certain combination of characters that isn't parsed properly maybe?

Guys, have a play with this Branch: https://github.com/andrewminton/codemirror/tree/version3

I'm using the Latest CodeMirror code and have added the xml.js highlighter file for specific markup of XHTML and XML. It needs cleaning up but can you check this works for you?

It's just lifted from looking at the Syntax and Codeview here.

EDIT I'm following the pattern from the old code with regards to the init file now... so it's using the right htmlmixed mode. I think?? :)

Also, don't know if this would be any help, but the old tool formerly known as ZenCoding, now Emmet, has a plugin for the CodeMirror editor, which will give "ZenCoding" type editing to CodeMirror.

Maybe worth adding the Emmet library to our CodeMirror for testing. So we'd use the 'xsl' profile for output?

We use mixed output so not sure if just 'xsl' profile is useful for people?

@moonoo2 - Just curious, is there any reason why in the customSnippets.js file you put the "XSL" snippets under HTML? If you look, there are already XSL snippets (toward the bottom).

The ones at the bottom werent being listened to for some reason.. so I just stuck them in the html block to test.. css or xsl snippets dont load in browser based versions so I've just placed all the abbreviation exstras in this file ti test for now.

If you have any insights into how it should be rendered feel free to send a pull request or something. Need to check if original codemirror repo is still being supported as well.

Also I think I just dropped the code in the bottom half directly from the json file so there are double quotes and escaped slashes where there shouldn't be.. I shalk take all unwanted code out when I get 5 mins tomorrow ;)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details