{"id":5874,"date":"2018-11-12T04:40:32","date_gmt":"2018-11-12T09:40:32","guid":{"rendered":"https:\/\/blogs.mathworks.com\/community\/?p=5874"},"modified":"2019-08-15T09:53:58","modified_gmt":"2019-08-15T13:53:58","slug":"a-new-rich-editor-for-matlab-answers","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2018\/11\/12\/a-new-rich-editor-for-matlab-answers\/","title":{"rendered":"A New Rich Editor for MATLAB Answers"},"content":{"rendered":"<p><em>This post comes to us courtesy of David Wey. David leads the MathWorks Online Community group in our Natick office.<\/em><\/p>\n<p>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&#8217;t it a WYSIWYG (&#8220;What You See Is What You Get&#8221;) editor? Similarly, you may have been puzzled that clicking on the code button inserts the following snippet:<\/p>\n<pre>if true\r\n % code\r\nend<\/pre>\n<p>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&#8217;ve struggled with writing and formatting text on MATLAB Answers.<\/p>\n<h2>There&#8217;s a new editor in MATLAB Answers<\/h2>\n<p>The November update to MATLAB Answers includes a new rich text editor. It&#8217;s the widget you use to ask, answer, or leave comments. What makes this change worth blogging about is that it&#8217;s the same component used in the <a href=\"https:\/\/www.mathworks.com\/products\/matlab\/live-editor.html\">MATLAB Live Editor<\/a>. This means that the rich-text and code authoring experience will be the same as it is in MATLAB when editing live scripts.<\/p>\n<p>We&#8217;re glad to be moving beyond the old MATLAB markup as we move towards the new live script format. In this first release, we&#8217;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:<\/p>\n<ul>\n<li>WYSIWYG editing<\/li>\n<li>Syntax highlighting<\/li>\n<li><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/help\/rtc#keyboard_shortcuts\">Keyboard shortcuts<\/a><\/li>\n<\/ul>\n<p>Here&#8217;s what it looks like with some sample content.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"706\" height=\"694\" class=\"size-full wp-image-5884 alignleft\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/Answers-rich-editor.png\" alt=\"MATLAB Answers rich text editor\" \/><\/p>\n<h2>What&#8217;s Next?<\/h2>\n<p>As the MATLAB Live Editor evolves from release to release, we&#8217;ll be looking to include features we think will benefit MATLAB Answers. As for the &#8220;Live&#8221; in Live Editor, the community team is actively working to allow visitors to run code in Answers.<\/p>\n<p>Take a look at the Answers <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/help\/rtc\">help page<\/a> to find out more and to <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/help\/rtc#live_demo\">try out<\/a> the new editor. As always, add your comments below and let me know what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/Answers-rich-editor.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>This post comes to us courtesy of David Wey. David leads the MathWorks Online Community group in our Natick office.<br \/>\nIf you use MATLAB Answers, you may have wondered why you enter your question (or&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2018\/11\/12\/a-new-rich-editor-for-matlab-answers\/\">read more >><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[51,9,36,17,39],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/5874"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=5874"}],"version-history":[{"count":16,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/5874\/revisions"}],"predecessor-version":[{"id":6692,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/5874\/revisions\/6692"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=5874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=5874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=5874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}