62249

Load html files in TinyMce

I have this:

<textarea name="content"></textarea>

and in javascript code in the same aspx file I call init to tinyMce.

I have html file which is in the same folder as this aspx file. How to make it show in the tinyMce?

Answer1:

Eighter render the content of your html file into the textare directly OR use ajax to get the file contents and set them as content of your editor. I assume your tinymce editor is already initialized then you may set the content from the ajax response using

tinymce.get('my_editorid').setContent(html_content);

Recommend

  • Send Facebook chat messages via JavaScript
  • Large textinput makes http post fail
  • jquery/javascript post to new window when pressing a preview button
  • How to make a modal JFrame or another JComponent?
  • Detecting tinyMCE textareas with JQUERY
  • JavaScript execCommand('copy') not working
  • JSeperator in JToolBar moves the components to right end
  • CKEditor separate the toolbar from the editor
  • Angular Databinding doesnt Work
  • Styling text for textarea Wicket
  • Submitting form to couchDB through update handler not working
  • Get textarea in codebehind
  • how to resolve OAuthException: (#100)
  • Python/Javascript: WYSIWYG html editor - Handle large documents fast and/or design theory
  • Validate child input components on submit with Vee-Validate and vue js 2
  • NSScanner Loop Question
  • jQuery .attr() and value
  • Paperclip, set path outside of rails root folder
  • Pass value from viewmodel to script in zk
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • Sending data from AppleScript to FileMaker records
  • Eraser for UIBezierPath
  • jquery mobile loadPage not working
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Compare two NSDates in iPhone
  • How to get icons for entities from eclipse?
  • Proper folder structure for lots of source files
  • KeystoneJS: Relationships in Admin UI not updating
  • AngularJs get employee from factory
  • Proper way to use connect-multiparty with express.js?
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Free memory of cv::Mat loaded using FileStorage API
  • coudnt use logback because of log4j
  • Change div Background jquery
  • How does Linux kernel interrupt the application?
  • Append folder name and increment by 1 using batch script
  • JaxB to read class hierarchy
  • Busy indicator not showing up in wpf window [duplicate]
  • Why do underscore prefixed variables exist?