--- loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex 2017/01/19 21:12:45 1.13 +++ loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex 2017/01/23 20:29:42 1.15 @@ -35,19 +35,31 @@ Once a resource has been published, the can be marked obsolete, and the version in your authoring space deleted, but the published version(s) will remain in your folders in the locations in which they were originally published. -\subsubsection*{The LON-CAPA markup language and the 5 editors} +\subsubsection*{The LON-CAPA markup language} Content documents are created in the LON-CAPA markup language. Like HTML, which is the language used to create all content on the web, the LON-CAPA language is a \emph{markup language}. A markup language is simply structured with \emph{tags}: each structure in the document starts with a \emph{start tag} like \texttt{} and ends with an \emph{end tag} like \texttt{}. Additionally, each structure (called an \emph{element}) can have \emph{attributes}, each one composed of a name and a value. For instance, \texttt{} starts a true foil. A markup language is defined essentially with a list of elements and attributes, and rules specifying which element is allowed inside which other element. -The LON-CAPA language includes most HTML elements, and adds more elements which are described in this manual. The syntax is similar to HTML, but with an additional constraint: when an element is started with a start tag, it must always be closed with an end tag. + +The LON-CAPA language includes most HTML elements, and adds more elements which are described in this manual. The syntax is similar to HTML, but with an additional constraint: when an element is started with a start tag, it must always be closed with an end tag (unless the empty element syntax is used, as with \texttt{
}). This syntax is sometimes called ``XML'' in this manual. XML is a specific syntax for markup languages, but the LON-CAPA language is actually not using the XML syntax, which would require escaping special characters in scripts. + +HTML elements are not listed in this manual, but good resources are available on the web to learn HTML. For instance: +\begin{itemize} +\item Learn web development:\\ +\texttt{https://developer.mozilla.org/en-US/docs/Learn/HTML} +\item HTML element reference:\\ +\texttt{https://developer.mozilla.org/en-US/docs/Web/HTML/Reference} +\end{itemize} + +\subsubsection*{Five editors} + \bigbreak The authoring environment currently includes 5 different editors: \begin{itemize} \item The \emph{plain text editor} is simply a text area that lets you edit the source code directly. It lacks any special feature, but can be useful for people with disabilities because it is supported by screen readers. To use it, CodeMirror must be disabled in the preferences, in the \emph{Authoring Space Configuration} section. \item \emph{CodeMirror} is a text editor, and it is launched when you click on the ``EditXML'' button. It lets you edit the source code directly, but adds syntax highlighting and templates to help with editing the code. -\item \emph{CKEditor} is a simple WYSIWYG HTML editor used in LON-CAPA to edit blocks of plain text or HTML. It is used when you click on the ``Edit'' button for a \texttt{.html} file and click on ``Rich formatting''. It can also be used within the colorful editor to edit blocks of text, also by clicking on the ``Rich formatting'' link. +\item \emph{CKEditor} is a simple WYSIWYG HTML editor used in LON-CAPA to edit blocks of plain text or HTML. It is used when you click on the ``Edit'' button for a \texttt{.html} file and click on ``Rich formatting''. It can also be used within the colorful editor to edit blocks of text, also by clicking on the ``Rich formatting'' link. CKEditor is just an HTML editor, and it does not support LON-CAPA elements well, with the exception of \texttt{} and \texttt{}, for which plugins have been added. \item The \emph{colorful editor} is LON-CAPA's default editor, launched when you click on the ``Edit'' button for a \texttt{.problem} file. It hides the source code and displays the document with colored boxes representing the elements. It provides a list of elements that can be inserted at a particular place in the document, helps to choose correct values when several values are possible for an attribute, and generally makes sure the syntax is correct. \item \emph{Daxe} is a new editor, meant to replace the colorful editor in the future. It is started with the ``Daxe'' button. Like the colorful editor, it hides the source code and provides a graphical interface which makes it easier to create documents without knowing the language. It displays elements in a better way, and makes it easier to edit documents with cut/copy/paste and drag \& drop features. HTML elements are often displayed exactly the way they look like in the end. Many response elements have both a ``simple'' and an ``advanced'' view, making it easy to create simple problems. A preview is available to the right, making it easy to see what the entire document will look like. \end{itemize}