tinymce-plugins / codemagic

CodeMagic is an advanced source code editor plugin for Tinymce. It integrates the CodeMirror library for syntax coloring, and the JSBeautifier library for code formating and indentation.
MIT License
33 stars 14 forks source link

Clicking Update when "Syntax highlighting" option has been turned off reloads previous content and syntax highlighting turned on #11

Open bsy-web opened 11 years ago

bsy-web commented 11 years ago

Current behavior:

  1. open CodeMagic (note current data)
  2. uncheck "Syntax highlighting"
  3. enter input
  4. click Update
  5. screen refreshes and CodeMagic dialogue shows previous data with syntax highlighting turned on.

Desired behavior:

  1. open CodeMagic (note current data)
  2. uncheck "Syntax highlighting"
  3. enter input
  4. click Update
  5. latest input from textbox field get sent unchanged to destination (usually main TinyMCE edit screen)

Work around:

  1. open CodeMagic (note current data)
  2. uncheck "Syntax highlighting"
  3. enter input
  4. check "Syntax highlighting" (changes to text should persist)
  5. click Update (changes should persist)

One of the best features of CodeMagic (when used for WordPress) is that it provides a standard textbox input field when syntax highlighting is turned off. This allows a user to use an add-on such as FireFox's It's All Text which allows editing in any external editor and populates the textbox upon saving in the external editor.