wysiwyg

load wordpress wp_editor dynamically (ajax)

孤街醉人 提交于 2019-12-18 03:48:22
问题 This is an answer/solution rather than a question, still there maybe some bugs, even I tried on my dev env. I recently try to use wp_editor in widget/menu, after some search, I did not find a complete solution as I want. I would share my solution in below after I dig into wp's code by hours: 回答1: There maybe hacking involved, however, I tried to minimize them. To make wp_editor can work in dynamic html (which means without reload page, js changes the page structure), there are two major

Are there any JavaScript live syntax highlighters? [closed]

笑着哭i 提交于 2019-12-17 22:16:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I've found syntax highlighters that highlight pre-existing code, but I'd like to do it as you type with a WYSIWYG-style editor. I don't need auto-completed functions, just the highlighting. As a follow-up question, what is the WYSIWYG editor that stackoverflow uses? Edit: Thanks to the answer below, I found two

Integrated Markdown WYSIWYG text editor

对着背影说爱祢 提交于 2019-12-17 21:25:07
问题 In looking for a straightforward WYSIWYG editor for Markdown code, I am not finding a comparible UI to that of CkEditor, TinyMCE, ect. Specifically, the Markdown "WYSIWYG" editors that are often recommended (such as posts like this ) are not pure WYSIWYG editors in the sense that users either still write raw Markdown ( MarkItUp ) or go to the other extreme of having in-line editing without standard controls ( Hallo ). I need something in-between. I'm looking for a Markdown editor that looks

How can I display bold text in a textarea? [closed]

有些话、适合烂在心里 提交于 2019-12-17 20:33:11
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have this code: <textarea><b>test</b></textrea> It displays the raw HTML code. Instead, I would like it to simply display bold text. How can I achieve that? 回答1: If you want the textarea to display bold text,

What's the best WYSIWYG editor when using the ASP.NET MVC Framework? [closed]

落花浮王杯 提交于 2019-12-17 15:26:50
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Was wondering what the best WYSIWYG editor that I can embed in a web-site based on the ASP.NET MVC Framework? Ideally it should be

CKEditor: Class or ID for editor body

十年热恋 提交于 2019-12-17 12:47:11
问题 I have an instance of CKEditor on a page. I am trying to give the CKEditor's body a class or ID so it matches some styles I have defined in a stylesheet. There is a API documentation that should give access to the respective DOM elements, but I can't seem to get it working. All objects I try to query that way turn out undefined. Does anybody know how to do this, or how to properly address CKEditor's dom elements? Edit : Thanks folks, nemisj's answer did it for me but for some reason, I don't

make readonly/disable tinymce textarea

大憨熊 提交于 2019-12-17 09:37:20
问题 I need to disable or make readonly a tinymce textarea at runtime. 回答1: Use the configuration parameter readonly tinyMCE.init({ ... theme : "advanced", readonly : 1 }); Here is a link to a demo. Update : What you can do to prevent users from editing content in your editor is to set the contenteditable attribute of the editors iframe body to false: tinymce.activeEditor.getBody().setAttribute('contenteditable', false); 回答2: From version 4.3.x on you can use code below for readonly mode tinymce

JS: Get array of all selected nodes in contentEditable div

孤街浪徒 提交于 2019-12-17 06:11:21
问题 Hi I've been working with contentEditable for a while now and I think I have a pretty good handle on it. One thing that's evading me is how to get an array of references to all nodes that are partially or fully within the user's selection. Anyone got an idea? Here's something to start from: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type"

How do i remove tinyMCE and then re-add it?

孤者浪人 提交于 2019-12-17 03:09:23
问题 I'm trying to add the tinyMCE editor to my page, remove it, then add it again but am getting errors. When I run Part A, then Part B, Than Part A again I get the error: Error: g.win.document is null Source File: tiny_mce/tiny_mce.js Line: 1 Part A js += " tinyMCE.init({ "; js += " 'mode' : 'exact', \n"; js += " 'elements' : '" + ctrl.ID + "Editor', \n"; js += " 'plugins' : 'insertdatetime,TVCMSLink,TVCMSImage',\n"; js += " 'theme' : 'advanced',\n"; js += " 'theme_advanced_layout_manager' :

TinyMCE Paste As Plain Text

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 03:08:06
问题 This is one of the common issue with RTEs on web. Could you please guide me through how to: Paste as the PLAIN TEXT Retain the HTML but remove the WORD/HTML styling I want to do it directly on paste (paste_preprocess callback), without opening the dialogs provided by Paste plugins. Any thoughts/experiences ? Thanks, Imran 回答1: This is what i do to get paste plain text. 1. paste_preprocess setting (in tinymce init) paste_preprocess : function(pl, o) { //example: keep bold,italic,underline and