I need to show a setting key from a Text Editable widget, it works fine in preview mode. But inside CMS it just show macro code.
Is there any way to run macro in preview mode both in CMS and live site?
The macro code will only display in Edit mode otherwise you'd have no way to editing or knowing there is a macro there. Once the system is running in preview or live site mode, it will render without issue (assuming you have a valid macro).
If you are trying to test or debug a macro, you can go to System > macros > Console or Benchmark
Related
I'm in a web design class and writing HTML tags. I have not used VSCode prior to this, but I am told that it's supposed to have emmet built in and should extend my code when hitting tab. It does not, tab works like a regular tab button.
I tried various online solutions such as including html in the languages and turning on 'true' for emmet when hitting tab and it still doesn't work. Any idea how to get it to happen?
I wanted to use the Monaco Editor for my project and I want to run the server side languages like C# or node in my Monaco editor(https://github.com/Microsoft/monaco-editor/) which is a open source editor from Microsoft.
Here are few examples for that.
https://microsoft.github.io/monaco-editor/playground.html#interacting-with-the-editor-rendering-glyphs-in-the-margin
https://dotnet.microsoft.com/languages
If you see the the above examples you can see they are running c# with run button I wanted to implement same functionality.
I know that I need to install run time for particular language like C# and I have that in my local machine but still I am not able to run it.
Any help will be highly appreciated.
What you see there is not a Monaco feature and is up to you to implement. How you do that, will depend largely on the language you're trying to run.
The first example (and jsFiddle and CodePen and many others) simply displays an iframe to show the result. That iframe loads a file with a unique name that contains the HTML, CSS and JavaScript code entered in the editor. You can confirm that this is what they're doing, using Chrome Dev Tools.
If you're going to run a language like C#, know that you will need full control of your web server. The flow will be something like this:
The user presses the Run button.
You call a web service (that you must develop), passing it the C# code and anything else needed to build a working project (like dependencies).
The web service creates the project from those inputs, invokes the C# compiler, runs the resulting executable, and finally captures the output (both stdout and stderr) into string variables. Those strings are returned by the web service.
Back in the browser, you display the output from the web service.
This is very doable, but getting it to perform well when your volumes pick up will be a special problem.
I have a LibreOffice Calc document which needs to be downloaded by remote users. It uses macros - so they need to have macros enabled for it to work at all and there is no control over user machines.
To help with this I have a text message on the first tab telling them they need to enable macros and some instructions how. On document open I run a macro to remove this message - as long as they have macros enabled they never see it and all is well.
This solution works but is not perfect because:
It will trigger the save changes dialogue even if they did no changes.
It leaves the message removed if they save and pass the document directly to another user.
Just doesn't feel like a well-engineered solution
Is there a better way to accomplish showing this message only when macros are not enabled?
I love chrome dev tool, it has been a huge productivity boost for me. I would love to find out if there is any plugin or way to get it to do auto-complete on javascript object (intelisense) and syntax highlighting in live edit mode? In the console you can press tab to complete a javascript object, property or method, but that does not seem to be available in live edit mode.
Thanks!
Auto-completion in the CodeMirror editor (should be enabled in the Settings) was landed yesterday behind a DevTools experiment "Enable text editor autocompletion" and should appear in the next Chrome Canary.
Regarding the syntax highlight, I'm not quite sure what your case is, since we always highlight JavaScript sources.
I find myself typing JavaScript in the console a lot. For example, I quickly want to see the result if I change the property of a certain object. However every time that I refresh the page I have to redefine my variables, etc. I do this by using the up-key, so I do not have to retype, but this costs a lot of time. What is a better way?
The ultimate coolness would be an environment like Sublime Text in which you can write multi line code and from there execute it directly in the browser... And then still have the autocomplete list of all the methods of an object (like in the console). Obviously this is not available, but I am very interesting in the workflow of other when typing JavaScript code in the console.
In Chrome 24's Sources panel, use the Snippets tab. Right-click in the left (blank) tree and choose New from the context menu.