WordPress.org

Ready to get started?Download WordPress

Forums

Adding Visual Editor Function to a Plugin (1 post)

  1. harknell
    Member
    Posted 6 years ago #

    Hi, with the new update to WordPress we've moved from tinyMCE 2.x to 3.x. In my plugins I use a relatively simple call to add the tinyMCE editor to my textareas for version 2.x of tinyMCE. Now with 3.x none of this works right. Apparently tinyMCE changed how you call their plugin, so now I'm having issues with the language variables not being populated correctly in the editor form (it's showing the variable names, not the actual titles for the different editor text), and images are receiving incorrect relative links instead of the correct absolute links when you try to use the add image button.

    My old code was:

    <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script>
    	<script type="text/javascript">
    	<!--
    	tinyMCE.init({
    	theme : "advanced",
    	mode : "exact",
    	elements : "awsomnewspost",
    	width : "565",
    	height : "200"
    	});
    	-->
    	</script>

    where my text entry forms were id=awsomnewspost.

    I've figured out a little bit of how to fix this issue by looking at the tinyMCE config file in the js folder of WordPress, but I'm really just shooting in the dark and would love to know if there is a tutorial or any documentation on how to integrate the new Visual Editor into a plugin (BTW, I am NOT talking about adding buttons to the editor, I mean making the editor appear in the admin page of a plugin for admin usage to add information--this is useful for my AWSOM News Announcement plugin)

    Thanks!

    (Oh and also, I did look at their docs at tinyMCE, and that's how I managed to get it to appear again at all, but the above issues are what resulted which makes me think that there are a ton of things that need to be added to the javascript code or init code to get this to work right in WordPress again)

Topic Closed

This topic has been closed to new replies.

About this Topic