Questions tagged [visual-editor]
The default visual editor in WordPress is Tiny MCE. There is an API that allows users to adapt the visual editor to their needs. It is possible to use other visual editors as well.
354
questions
2
votes
2
answers
2k
views
How to remove these comments and html tags from the content?
These are actually input fields.
paragraph is the textarea field.
i query the contents from database and try to show them in this textarea field.
But the textarea field is showing me unwanted comments ...
1
vote
5
answers
9k
views
Is there any way to set default for "Insert/Edit Link" to "Open link in new window"?
I almost always select "Open link in new window" when creating an URL/HREF. Is there any way to default this choice.
Even if it requires a small source code change, I think it would be worthwhile (...
1
vote
4
answers
16k
views
Wordpress "Page not found error" when I edit a page
On a Wordpress based website, when I add text using wordpress visual editor or HTML source to a particular page - it gives "page not found error". I tried by adding some other text and its working ...
1
vote
1
answer
5k
views
Restrict file uploads by extension?
Is there a way in WordPress 3.1 to restrict allowed file uploads by extension (images only) and file size?
Bonus question: Can I limit users to only be able view files they have uploaded themselves?
1
vote
4
answers
6k
views
Preserving tabs and line breaks in <pre><code> when switching from HTML to Visual Editor
Tabs placed in a <pre><code></code></pre> block are stripped and line breaks are removed leaving a single continuous line of text. This occurs when switching from html to ...
1
vote
1
answer
5k
views
Convert this textarea to rich html format via wp_editor
I have a texarea in a page that works like a charm, but I would like to convert the area to a html rich wp_editor. Could anyone tell me how to convert this textarea to a wp_editor field?? Thanks
<...
1
vote
2
answers
331
views
Strange gibberish JavaScript in Editor – site hacked?
A client's website runs on the theme 'enfold' which features the "Enfold Advanced Layout Editor". Currently that editor is broken – probably due to old version vs php or something. Anyways – trying to ...
1
vote
1
answer
6k
views
Close TinyMCE plugin window on click away
I've created a small plugin which adds a button to the TinyMCE toolbar. When clicked, it opens a popup window via editor.windowManager.open(). That popup can be closed by (1) clicking the "Cancel" or "...
1
vote
2
answers
3k
views
Visual Editor gone
My visual editor is missing in a project
I've tried this guide which includes deactivating ALL plugins, changing the theme, empting the cache and still at that point there was no Visual Editor, only ...
1
vote
1
answer
2k
views
How to get Text Selection in WordPress Editor
I want something like if I select any word in WordPress Visual Editor, it will get replaced with my own text.
Actually Visual Editor is an iFrame. We can do this thing in textarea, but how can we ...
1
vote
3
answers
8k
views
Remove permalink from images when inserting into post
In previous versions of WP, we were able to remove permalink from images while we were inserting images into post.
But now there is no obvious option to do so. How can it be achieved?
1
vote
1
answer
238
views
Trouble adding JavaScript in visual editor (Sharpspring embed code)
I am trying to add the embed code for a sharpspring form signup to my site. It says that it works with WordPress but when I add the code to the text section of the page and save the script tags are ...
1
vote
1
answer
2k
views
Is it possible to ignore the first Line Break in a preformatted Div from a shortcode?
I created a shortcode of [pncode] that lets me enclose some programming syntax and apply some styling. Notably, it preformats the text and makes it monospace (full CSS below, if it helps).
In the ...
1
vote
1
answer
829
views
How to reset display of WYSIWYG editor
I recently installed WordPress on a new domain but I have a small problem. This WYSIWYG editor displays very small text with no padding. Here are some examples.
Desired behavior:
Actual behavior:
...
1
vote
2
answers
191
views
How can I determine what mode the editor is in and when it changes?
I need to determine if the page/post editor is in Visual or Text mode. I also need to determine when this changes.
Does WordPress provide some kind of functionality for doing this? I am writing some ...
1
vote
2
answers
2k
views
How to display php source code inside a post using visual editor?
NOTE
I don't want the php code to be executed, only displayed.
I want to display this php code <?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); ?> inside a post. I cannot make ...
1
vote
1
answer
2k
views
Can I remove the Rich Text box editor for a specific post?
A few months ago I asked a similar question:
Is it possible to remove the main rich Text box editor? and got the following answer:
function remove_pages_editor(){
remove_post_type_support( 'page',...
1
vote
1
answer
2k
views
How to hide wordpress default description box?
I'm using custom fields in my wordpress default post area. So i don't want wordpress default description box.
I mean i dont want this field.
Instead of description box i want excerpt box there. ...
1
vote
1
answer
3k
views
Why does the HTML editor not wrap my code in paragraph tags when I press enter
Normally when using a rich text editor, when you hit return (i.e. do a full paragraph return) Your text is wrapped i.e. <p> my text </p> however this does not happen in wordpress.
Is ...
1
vote
1
answer
935
views
Limiting allowed html elements/strip harmful scripts from editor
How can I limit html elements allowed in the tinymce editor in Wordpress 3.1 and ensure harmful scripts have been removed (script/embed tags, etc)
1
vote
2
answers
2k
views
Switching From HTML to Visual Editor and Back Completely Strips Page Contents
I have a page (not a blog post) I need to embed an iframe on (it's to "integrate" an external service's product catalog). I added the iframe code in the raw HTML editor and saved the page. I viewed ...
1
vote
1
answer
175
views
Why do I keep losing links when I switch to visual editor in Wordpress
I have this problem in a specific page of my wordpress website: when I switch from text editor to visual editor I immediately lose all my links (placed in a div element).
I give you a detailed example ...
1
vote
1
answer
888
views
How to disable formatting
Everytime I copy something, Wordpress will format the content like it was in that text. For example if I copy a link from Wikipedia, Wordpress will format that word to be bold, blue and with underline....
1
vote
2
answers
458
views
How to add a second stylesheet to the editor
Is it possible to add another stylesheet from my theme directory, to the Appearance > Editor screen?
1
vote
1
answer
4k
views
Add table button in editor without Plugin
i want to add the "tablecontrol" ty the editor.
This is what I've tried:
function my_mce_buttons_1($buttons) {
$buttons[] = 'superscript';
$buttons[] = 'subscript';
$buttons[] = '...
1
vote
1
answer
6k
views
Make Textarea a TinyMCE (editor box)
Ive picked up an old plugin and am needing to enhance it for my clients specific needs.
In the admin section there is a text area used to add info about a download (essentially a custom post type). ...
1
vote
1
answer
211
views
Can't load a class into WordPress post editor's content field
Following to THIS WordPress QUESTION we tried some tweaks and got some nice solutions, hope we can public them after some good active codes-snippets.
According to our procedures, we correctly ...
1
vote
1
answer
776
views
Editor background colour in full screen
In this Q&A, How do you change the visual editor's background color?, it is shown how to modify WordPress' editor background colour.
My question is how can I modify the editor's background ...
1
vote
1
answer
646
views
Disable pasting of images into wordpress editor
I have a user who loves to do this, It works fine for the website, but when it gets transferred over to the newsletter it breaks the newsletter.
Is it possible to disable pasting of images into the ...
1
vote
1
answer
747
views
How to have custom tinyMCE buttons break onto next line when too long
There is probably a really simple solution that I am missing here but I have added multiple custom buttons to the tinyMCE editor in Wordpress and my problem is the row of buttons is too long (they're ...
1
vote
1
answer
167
views
How to get line breaks to translate to paragraphs?
How can I get the line breaks that I make in the TinyMCE editor to translate into new lines in the web page. Suddenly all posts when actually previewed on the theme are walls of text. In the final ...
1
vote
5
answers
3k
views
Resizing the wordpress editor
I've been looking around on how to re-size the WYSIWYS editor for wordpress and have used firebug to re-size the #post-body-content but it doesn't resize ever. It will resize in the firebug ...
1
vote
1
answer
1k
views
Getting selected (highlighted) html from the Visual Editor on Edit Post page?
So I understand that the visual editor uses something called TinyMCE. How do I retrieve the html that the user selects from the visual editor? I am basically trying to create a button that gets the ...
1
vote
2
answers
767
views
How to add a strip of visual editor on top of comments textarea
My blog is WP3.1.2, theme: Twenty Ten
I would like to add a strip of visual editor on top of the comments box (something like you see at the top of question box on this site). How can I do it WITHOUT ...
1
vote
2
answers
1k
views
Visual Editor Templates
Hi there is anyway to style the visual editor in WordPress. For example if the user selects the page template shop say it loads into the visual editor a preset template which divs and formatted text.
...
1
vote
2
answers
477
views
Tiny MCE-modifications (plugins) stopped working in WordPress 5.6
A while back I stumbled across this post from 2015, that showed how to add Tiny MCE-buttons.
It has been working for more than a year. But after the latest WordPress update (to version 5.6) it stopped ...
1
vote
1
answer
507
views
TinyMCE Visual Blocks plugin set Show blocks option for all users
I want the Show blocks feature of the TinyMCE Visual Blocks Plugin to be activated for all users.
I can activate the Show blocks feature under the View menu dropdown manually. See picture. This ...
1
vote
1
answer
303
views
create-guten-block in wordpress theme?
I'm working on a wordpress theme and want to replace my shortcodes with gutenberg blocks. I'm new to working with blocks but having looked into it a bit I've decided to try and use create-guten-block ...
1
vote
1
answer
2k
views
Custom wp.editor.initialize settings ignored
I built a meta box where a click on a button shows a textarea with rich text editing enabled. After creating the textarea and appending it to the DOM, I run this to initialize the editor:
console.log(...
1
vote
1
answer
1k
views
Wordpress Admin Not Loading All Core Scripts
For some reason, Wordpress admin is not loading all of the required scripts via load-scripts.php. This is causing the "Visual/Text" tabs to be missing from the text editor. The 'b', 'i', 'link', etc ...
1
vote
1
answer
725
views
Uncode theme content block header ignoring saved changes/not updating?
I am attempting to change the content block that holds the information for the header on the home page. The content block has successfully been edited by the previous developer but now it seems to ...
1
vote
1
answer
46
views
Why the post content editor always expanded?
I'm having my wordpress post editor always expanded, and i don't like this and don't no why it has been turned into this. How to disable this auto expansion?
1
vote
1
answer
2k
views
Create Archive Page with Visual Composer
I have a custom post type and have the file created called archive-services.php in my theme. I want this archive page to be represented by a user created page in wp admin. This way the user can create ...
1
vote
1
answer
1k
views
Is there a way to show only the text editor
I'm working on a desktop app and I'd like to show only the editor and it's toolbar.
I'm able to load and save the past content easily enough through the app but I'd like to be able to reuse the ...
1
vote
1
answer
355
views
WordPress custom post - add dynamically meta boxes
I want build an custom editor for my custom post type in WordPress. I'm able to add multiple tinymce editor to the post type, but I want this dynamically.
I'd like admin users to be able to create ...
1
vote
2
answers
450
views
Why is my theme is randomly stripping the <p> tags out
I haven't done anything to my clients site but add some more text to a testimonials page, updated it & then went to go see the page and it's been all smashed together! It's using randomly placed &...
1
vote
2
answers
2k
views
Visual/Text tabs in wp editor Not Showing
I have a wordpress website that i have added custom meta boxes to the post.
Custom meta boxes have an editor using wp_editor(), but the editor is refusing to show the visual/text tabs on the editor ...
1
vote
1
answer
2k
views
Custom TinyMCE style formats disabled
I've created a TinyMCE style dropdown for the TinyMCE WordPress editor.
The formats are appearing as expected on the editor but when the drop down is expanded to choose from a style, they are showing ...
1
vote
1
answer
852
views
How to type shortcode-like text in WordPress TinyMCE visual editor?
Suppose, I have a plugin which is offering a shortcode for its users: [my-shortcode]. Now I want to post an advertisement in a page of my WordPress powered blog like the following:
Hey you can use ...
1
vote
1
answer
595
views
Preserve shortcode content formatting
How can I preserve the formatting of the content within a shortcode block when I switch back and forth between the visual and text editor in TinyMCE? As in, the stuff between [myshortcode] and [/...