It's Time to Edit!
Hello there,
Edit a Content Model
In the last week there have been changes for the Content Model Edit interface. The ability to change how the information are printed out in the website is one of the most useful for who has to manage the website.
The Question
With the current interface is possible just to change the model or maybe correct spelling and fix syntax errors.
But actually do you feel ok about developing an entire Content Model in that box?
With the current interface is possible just to change the model or maybe correct spelling and fix syntax errors.
But actually do you feel ok about developing an entire Content Model in that box?
My answers is no.
And surely also the other developer and website manager agree with me.
Then?
A good thing could be to have syntax highlighter, good! And another good thing would be to have an editor with the code assist function, very good! And also with the keyword case fixer, local variable and keyword recognition, line numbers too... everything in one.
Then?
A good thing could be to have syntax highlighter, good! And another good thing would be to have an editor with the code assist function, very good! And also with the keyword case fixer, local variable and keyword recognition, line numbers too... everything in one.
Someone else already developed and distributed a good Javascript software for it: CodeMirror (http://codemirror.net/).
The News
We've integrated the Codemirror2 editor in our Edit Model back-office interface. With some specific things:
- velocity syntax highlight, you will recognize the tamarillo/hibiscus colour inside the full coloured html
- auto-completion will suggest you the available variables and recognises if you are asking a property of $content or a property from $content.yourAttribute.
- auto-completion will also understand local keywords
The Pieces of The Puzzle
Put your attention to our repos. These are new files shipped for the mint interface (a.k.a. advanced), In detail:
- the velocity overlay for CodeMirror2 with its css (for tamarillo and hibiscus) //velocity-overlay-mode.js
- an editor manager //contentModels-editor.js
- the jsp //content_entryModel.jsp
- codemirror-compressed.js with overlay.js, of course we included the main libraries :)
Bye
No comments:
Post a Comment