WYSIWYG editor choices - php

CKEditor is a very good HTML editor. However, when I paste some html structure and shift to the WYSIWYG mode, the editor automatically reform the html structure which I do not expect, and therefore the original html layout is changed.
I would like to explore if there would be other alternative editors that can preserve the entire codes with the these characteristics:
capture external css file to become inner editor css
capture external template for inner editor usage
be able to integrate with elfinder 2.0
function similar to ckeditor, when applying contenteditable="false", that particular div will be frozen and cannot be edited.

I have always used TinyMCE: http://www.tinymce.com/
It is highly customizable, and compatible in most browsers including mobile.

Related

Email template editor similar to Campaign Monitor

I need to do a similar email template editor as Campaign Monitor have (http://www.campaignmonitor.com/templates/). I tried a lot of wysiwyg editors, but it doesn't work as i want.
Do you know which technologies are used? I don't know how to do a panel which will edit the content on a right side.
If you have some tips, good resources, articles, I'll be really glad!
Thank you in advance!
I've been looking into this myself, as our CMS is being rebuilt and needs better WYSIWYG editors. They use a heavily modified version of CKEditor http://www.ckeditor.com
CKEditor has a version 4 in beta which will support in-line editing (something we need) so I'll be watching this one closely. Demo's at http://nightly-v4.ckeditor.com/3466/samples/
Their technology is proprietary. In the last few years every ESP created its own editor of this kind.
Mosaico Editor is the first open source email template builder in this class.
You can find a free to use deployment (working also as live demo) at http://mosaico.io and you can get sources at https://github.com/voidlabs/mosaico
You can choose blocks from a set defined by the "master template", then you fill you contents and change their styles in a WYSIWYG style. If you're on a large window you can also have live preview for the mobile version.
The master template defines what are the blocks, what you can edit and what you can style and it contains any html trick to make it compatible with most clients: this means you can change the editor behaviour a lot by simply writing a new master template.
It is 99% javascript (IE10+, and any other modern browser) and depends on server-side functions only to do "final inlining" and "image upload/resizing"

Text editor for CMS

I have a website and I have created the CMS for it using PHP and mySQL.
When I edit the content with the CMS I am actually editing the content stored inside mySQL then, using PHP, the content is displayed back to the site by reading the updated content from mySQL.
Now I am looking for a text editor to use inside my CMS to format the text and display the "formated" text on my site.
Any suggestions?
Thanks!
One of the most popular and easiest editor to use is TinyMCE available at:
http://www.tinymce.com/
Another few editors i know of but don't use anymore are:
FCKEditor (Maybe the same as CKEditor that Shyiu proposed)
Xinha Open Source Editor
I recommend TinyMCE for it's flexibility, speed and ease of use compbined with JQuery support.
Good luck
I have used CKEditor in one of the projects i worked and i worked fine for me
http://ckeditor.com/
You can take a look at WMD editor

Textarea which allows HTML content in Database [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
javascript WYSIWYG HTML editors?
Im not quite sure how to put this as i dont know what its called. But essentially what i need is a textarea like the one on stack overflow with a Bold button where you highlight text, or bullet points etc and I have heard there are some good open source ones.
I have a database with php going into it from a plain text area, i just need to be able to do extra features.
Many thanks!
From another thread where I posted the same answer:
There are many to choose from. Among the most popular are:
Aloha Editor - Open Source browser based html5 enabled rich text
editor.
CKEditor - Open Source browser based rich text editor.
TinyMCE - Open Source editor control.
WYMeditor - Open Source XHTML editor focusing on semantic markup.
Dijit Editor - a Dojo-based rich text editor component.
YUI Rich Text Editor - a Yahoo! rich text editor component.
KindEditor - Open Source HTML editor.
Source: http://en.wikipedia.org/wiki/Rich-text_editor
I personally use http://ckeditor.com/ for most things, since you can customize it to meet your demands with relative ease, and dispite many WYSIWYG editors it actually handles the generated HTML quite well.
For the textarea to receive and send off data, you will need to consult the documentation for the WYSIWYG editor you are using, since it varies from editor to editor, how you manipulate, set and get data.
You will need to output the HTML with PHP like this:
echo htmlspecialchars($database_stuff["content"]);
Then the otuputted content will not be parsed by the browser (but by the WYSIWYG editor - if parsed at all).

API for writing in textarea with HTML code

I want users to write HTML code, so they could format text and I could put that into database. I want users to be able to make lists, bold text, italic and I guess that's it. Thanks.
You should use ckeditor.
CKEditor is a text editor to be used inside web pages. It's a WYSIWYG editor, which means that the text being edited on it looks as similar as possible to the results users have when publishing it. It brings to the web common editing features found on desktop editing applications like Microsoft Word and OpenOffice.
for replacing all text area with html editor refer below link.
http://svn.ckeditor.com/CKEditor/trunk/_samples/php/replaceall.php
I just recently implemented Chipersoft's version of WYSIWYG Markdown Editor, works much like Stackoverflow's markdown editor.
You can save the markdown version in your database, then when you want to render it, you can use PHP Markdown to convert it from marked down to actual HTML tags.
These two apps work great together, and means less of a footprint in your database (and on filesystem), because you are not having to store the full blown html tags.
Markdown Editor: https://github.com/ChiperSoft/wmd
Markdown to HTML Converter: http://michelf.com/projects/php-markdown/

edit uploaded docx file in PHP

I need to open uploaded .docx file and possibility to change values. I know, that docx file consists of xml files. So, the main question is maybe somebody know a good WYSIWYG web-based xml editor?
I know one called XOPUS, but i have no idea how to configure it. Maybe somebody knows other alternatives for that task or advices, how to put xml file to textfield, where i could change values.
There are a couple of PHP toolkits that you can use for this task, first off there's an early dev on on codeplex:
http://openxmlapi.codeplex.com/
However you may b better off with one of the more mature ones:
http://holloway.co.nz/docvert/index.html
http://www.phpdocx.com/
Both of these can convert from docx to most of the popular formats, HTML included.
Once you've converted to something like HTML, then you can use an onscreen editor such as tiny MCE:
http://www.tinymce.com/
To provide in page rich editing capabilities, before finally using the above toolkits to convert back to DOCX or any other applicable format.
Update February 2014
Since I first wrote this reply things have moved on. The open xml kits I mentioned above are still valid, however in page editing is now more of a possibility than ever using the new HTML5 content editable and edit mode attributes.
It's now insanely easy to add your own buttons (Using something like bootstrap) above a div that has a content editable attribute attached to it.
Connecting the buttons to "document.execCommand" can then send, bold, italic, underline, link & image creation, list insertion and all manner of other HTML constructions methods directly to this div without needing anything like tinyMce or another in page editor anymore.
There is full details available on the Mozilla developer network, and I am planning o do a blog post on using this stuff very soon.
Have you tried PHPWord?
One may use the DocxUtilities class of PHPDocX to do some partial editing of an existing Word document.
This class allows you for:
searching and replacing a particular string of text
searching a string of text and remove the containing paragraph or section
highlight predefined strings (search and highlight)
full merging of docx files (text, images, charts, footnotes, ...)
If that is not enough for your purposes you should then prepare a PHPDocX template to fully customized an existing Word document.

Categories