This post comes to us courtesy of David Wey. David leads the MathWorks Online Community group in our Natick office.
If you use MATLAB Answers, you may have wondered why you enter your question (or answer) in one area and see a preview in another. Why isn’t it a WYSIWYG (“What You See Is What You Get”) editor? Similarly, you may have been puzzled that clicking on the code button inserts the following snippet:
if true % code end
Probably not very helpful. You most likely select this snippet and type your own code in its place. Well, we have something we think will help those who’ve struggled with writing and formatting text on MATLAB Answers.
There’s a new editor in MATLAB Answers
The November update to MATLAB Answers includes a new rich text editor. It’s the widget you use to ask, answer, or leave comments. What makes this change worth blogging about is that it’s the same component used in the MATLAB Live Editor. This means that the rich-text and code authoring experience will be the same as it is in MATLAB when editing live scripts.
We’re glad to be moving beyond the old MATLAB markup as we move towards the new live script format. In this first release, we’re starting off with just a few of the features found in the MATLAB editor component. For example, in addition to a few more text formatting options we are including code formatting options and LaTeX support. Here are some of the improvements we are excited to have:
- WYSIWYG editing
- Syntax highlighting
- Keyboard shortcuts
Here’s what it looks like with some sample content.
As the MATLAB Live Editor evolves from release to release, we’ll be looking to include features we think will benefit MATLAB Answers. As for the “Live” in Live Editor, the community team is actively working to allow visitors to run code in Answers.