Tinymce Plugin Rendering Source Code With Form Results - tinymce

I am using Tinymce in a textarea form field to add 'Rich text Editing' to the field. (Form Method = POST).
I used this tutorial to install the files.
In the form itself.. the editor works great.
However....
ISSUE: When my form results are produced, the results include the raw text and source code, instead of the formatted text.
Obviously... the Tinymce plugin has several files and folders. But....
If anyone has experience with the Tinymce plugin, perhaps I am making a rookie, generic, first time error???
Any guidance would be helpful. Thanks.

I figured it out. In my php, I just had to remove htmlspecialchars

Related

Does tinymce have an option, via menu, to insert form fields into it or just by editing the code?

Does anyone know of a ready-made plugin that allows adding input, textarea, select etc. on tinymce?
The tinymce.dom.Selection API (https://www.tiny.cloud/docs/api/tinymce.dom/tinymce.dom.selection/#select) allows you to select elements or set content in the TinyMCE editor. You can assign the API class to an action or an interaction element like a button or form, and any selected content will be replaced with the contents the API action passes in.
If that's not a good fit for what you need, is there an example of the type of adding input, a textarea, or a select you're looking for?
There are no official plugins that allow such interactive elements to be added. TinyMCE is a text editor that is built to create blog posts, articles, etc. By design, it is not a page builder. However, there may be some unofficial plugins on GitHub that may implement such features.
If you are going to insert forms and text areas that should not be edited or reconfigured afterward, you can use templates. They may come as any valid HTML. Thus, some fixed forms can be just saved as templates.
Another way is, of course, inserting HTML directly into the code.

Tinymce Richtext-editor not rendering macro RTE

I'm running a site with umbraco version 4.11.1 and is trying to render the info of a macro within a tinyMCE richtext-editor without any success.
In version 4.11.1 (and perhaps some other versions before this) Umbraco has a button for rendering macros within tinyMCE. If you click this button it will show all the macros that you have been able to render. If I add a macro, it will render out the stuff I've entered in the macro, within an orange-dotted border, which means that the editor understands that I've added the macro.
However, after I save and publish and enter the page where I've added the macro, it doesn't render anything. I came across some posts when I googled the problem and found out that I could trace the problem using a querystring (?umbDebugShowTrace=true) and look through the HTML and see what has been rendered. I found the following HTML:
<?UMBRACO_MACRO macroAlias="Testmacro" />
...which should render, if you ask the people in these posts.
If anyone had this problem, or know how to solve it. Please feel free to participate.
Thanks in advance.
David
Try
string macro = umbraco.library.RenderMacroContent("<?UMBRACO_MACRO macroAlias=\"Testmacro\" ReusableText=\"1112\" ></?UMBRACO_MACRO>", 1112);
string result = paragraph.Replace("<?UMBRACO_MACRO macroAlias=\"Testmacro\" ReusableText=\"1112\" />",macro);
Best regrads

WYSIWYG Editors Ripping Table Cells and Images on Save

I have built a bespoke CMS in php and have used a wysiwyg editor to save description areas. For some reason when a table or an image is inserted they are not getting saved. On preview they seems to be fine however after the data is saved the edit seems to rip off the tables and images.
I have tried both CKEditor and Tinymce and have the same problem on both hence I am guessing this could be a database or server side error.
If anyone could help I would really appreciate it.
One thing I noticed was that I had to go into settings and specifically tell tinymce to stop taking out the <p> and <br /> in my code.
My tables were getting screwed up until I did that. While that might not be your specific problem, it might help to go through the advanced settings for your wysiwyg and check for things like that.
Check your tinymce settings valid_elements and valid_children to find out if tinymce strips out your elements.

TinyMCE executes HTML tags - how to stop it?

I'm trying to include simple code samples in the TinyMCE editor. It looks fine when I'm writing it and when it is saved in the MySQL database. But when loading it in the TinyMCE editor once again the HTML-tags seems to be executed, even though they are saved as HTML names and not the actual tags.
For example if I write
<b>test</b>
In the database this was exactly what was stored, but when loading it in the TinyMCE editor, it now looks like
<b>test</b>
And if this is saved and loaded one more time it turns into
test
So it seems like TinyMCE is executing the tags, even though they are not actual tags to begin with. Does anyone know why this is happening?
I have tried to add the pre-tag and code-tag around the code, but it seems to be ignored by TinyMCE. I've also tried to add
preformatted : true,
verify_html : false,
to the TinyMCE init-function.
Any help would be greatly appreciated.
Thanks.
From v3 documentation:
Removed in 3.4
This option enables or disables the built-in clean up functionality. TinyMCE is equipped with powerful clean up functionality that enables you to specify what elements and attributes are allowed and how HTML contents should be generated. This option is set to true by default, but if you want to disable it you may set it to false.
Notice: It's not recommended to disable this feature.
It might be worth mentioning that the browser usually messes with the HTML. The clean up not only fixes several problems with the browsers' parsed HTML document, like paths etc., it also makes sure it is a correct XHTML document, with all tags closed, the " at the right places, and things like that.
Example of usage of the cleanup option:
tinyMCE.init({
cleanup : true
});
I found out this is not a TinyMCE problem, this is just how textareas work. I used the PHP function htmlspecialchars() and everything is now working as intended.
<textarea><?=htmlspecialchars($content)?></textarea>

tinymce dijit.editor

I have been using tinyMCE over dojo dijit.editor because tinyMCE wins out on functionality. Though I've just come across this: http://phphtmledit.com/dojo/ShowEditor.php?gclid=CPizxJzR3qQCFQpBbgodFidd9A
which, if I'm reading it correctly, claims to be a dojo editor but has all the functionality of tinyMCE.
So my question: are there more dijit.editor plugins out there? So far I've found these: http://docs.dojocampus.org/dojox/editor/plugins
http://docs.dojocampus.org/dijit/_editor/plugins
In particular, is there an image inserter plugin for dijit.editor?
There is an image uploading / inserting plugin - dojox.editor.plugins.UploadImage
The demo behind your link looks like a demo of the http://cutesoft.net/ WYSIWYG editor. (Found the link in the HTML source) You can always mail cutesoft and ask them if they build their editor on top of dojo...
As far as I know all the editor stuff in dojo is documented behind the links you already found and you can of course always write your own plugin.