.. _dijit/_editor/plugins/ViewSource:
dijit._editor.plugins.ViewSource
================================
:Status: Draft
:Version: 1.0
:Authors: Jared Jurkiewicz
:Developers: Jared Jurkiewicz
:Available: since V1.4
.. contents::
:depth: 2
Have you ever wanted to edit the source generated by the dijit.Editor, but were unable to do so well? Wouldn't it be nice to be able to see the source edited by the editor as an alternate view of the content? Well, with this plugin you can do exactly that.
========
Features
========
Once required in and enabled, this plugin provides the following features to dijit.Editor.
* Button with icon in toolbar for switching the view of the content from RTE to Source mode and back
* Keyboard hotkey: CTRL-SHIFT-F12 toggles between source and RTE mode of the content.
* Works well when paired with the FullScreen plugin. This plugin is 'FullScreen' aware and will behave appropriately.
* Built-in filters to strip out potentially dangerous input from being inserted, such as
.. html::
Toggle the View Source button to see the contents in source mode.
Enabling read-only view
-----------------------
.. code-example::
:djConfig: parseOnLoad: true
:version: 1.4
.. javascript::
.. html::
Toggle the View Source button to see the contents in source mode.
Viewing Source with PrettyPrint Plugin enabled
----------------------------------------------
.. code-example::
:djConfig: parseOnLoad: true
:version: 1.4
.. javascript::
.. html::
Toggle the View Source button to see the contents in source mode.
Viewing Source with PrettyPrint Plugin enabled and readOnly source
------------------------------------------------------------------
.. code-example::
:djConfig: parseOnLoad: true
:version: 1.4
.. javascript::
.. html::
Toggle the View Source button to see the contents in source mode.
Viewing Source with PrettyPrint and FullScreen Plugins enabled
--------------------------------------------------------------
This example also organizes the toolbar a bit.
.. code-example::
:djConfig: parseOnLoad: true
:version: 1.4
.. javascript::
.. html::
Toggle the View Source button to see the contents in source mode.
========
See Also
========
* :ref:`dijit.Editor `
* :ref:`dojox.editor.plugins `