I want to set my textarea in my php project with texteditor like Stackoverflow's. So I can input Text Code in special format display. Is there any plugin like that in PHP?
Creating text with some markup syntax is usally done on the client-side and not server-side, which is why I would recommend you look for a javascript-wysiwyg-editor.
Check out this link for an overview.
Check out this Blog Post for info on how WMD Markdown Editor is used on Stack Exchange (as answered in this Meta question).
Related
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.
I was wondering how I would be able to test for text using Protractor when part of my text contains a link to a separate page.
Is there a way to expand the link and get the raw text to expect that?
Should I use something similar to:
expect(myText).toContain("Some text <a href="..."")
Thanks
If the text is a link, you can use following locator for the same
expect(element(by.linkText('Google')).getTagName()).toBe('a');
This is in case when link is like this in DOM
Google
Source: Software Automata - Protractor – Locators
I'm implementing a blog in my website and i'm looking for a plugin that will allow the users to style their posts. Like the bar here in stack overflow that lets me add images, links and such...
I'm not looking to integrate wordpress. I already have the blog engine implemented, and I'm just looking for this kind of plugin.
Anyone know about one?
Many thanks!
Uri
What you're looking for is a WYSIWYG editor that is embedable in your backend.
WYSIWYG is an acronym for "What You See Is What You Get". In computing, a WYSIWYG editor is a system in which content (text and graphics) displayed onscreen during editing appears in a form closely corresponding to its appearance when printed or displayed as a finished product, which might be a printed document, web page, or slide presentation.
This way you can adapt a textarea to make it something like the editor you have on SO.
Try googling "embedable WYSIWYG editor": http://tinyurl.com/nd3to4c
You'll find tons of javascript plugins that give you these features.
Is it possible to implement custom HTML or PHP in MODx CMS pages?
I want to do more than the Rich Text Editor can offer.
Thank you.
You can add your HTML in chunks or templates, only getting the content you need from the rich text editor to use in your template, you shouldn't really be adding too much HTML to page content as this would allow a user to mess around with the page layout.
As for using your own php this can be implemented using Snippets
The Rich Text Editor offers a source view mode where you can enter your own HTML. This would be valuable in case you want to do something fairly standard like add a DIV tad with an ID.
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.