wysiwyg

angular2 wysiwyg tinymce implementation and 2-way-binding

你离开我真会死。 提交于 2019-11-28 01:15:27
Hi I'm trying to implement tinymce into an angular 2 component for a small forum to create a new thread. I want the content of the textarea (tinymce) be 2-way-binded to a variable inside the component. So far the submit button works but the keyup event doesn't. export class ForumNewThreadComponent implements OnInit{ constructor(){} ngOnInit():any { tinymce.init( { selector: ".tinyMCE", }) } text:string; submit(){ this.text = tinymce.activeEditor.getContent(); } getTinymceContent(){ this.text = tinymce.activeEditor.getContent(); } } and view <div class="thread-body"> {{getValue}} <textarea

TinyMce Allow all Html tag

别说谁变了你拦得住时间么 提交于 2019-11-27 20:01:54
I'm using TinyMce and even though the danger of a script attack, I need to enable all html tags with the editor. Currently, I'm use like: valid_elements: "@[class],p[style],h3,h4,h5,h6,a[href|target],strong/b," + "div[align],br,table,tbody,thead,tr,td,ul,ol,li,img[src]" But always need to add something, I want to enable ALL HTML tags with all attributes. Is there such switch that Disables the HTML filtering? You can set valid_elements : '*[*]', to allow all html tags. To keep style tags, use valid_children : "+body[style]" 来源: https://stackoverflow.com/questions/6266487/tinymce-allow-all-html

Content Editable Text Editors

时光怂恿深爱的人放手 提交于 2019-11-27 19:53:18
I have tried out several HTML editors including TinyMCE, CKEditor and now NicEdit. NicEdit is good in one respect - it is very easy to customize. However, I have found that they all have a tendency to produce very poor HTML. Not necessarily so but because they don't do much to correctly interpret invalid user actions such as attempting to style something without first having made a selection. It is far too easy to end up with HTML that contains something like <span style='color:#ff0000'><span style='color:#ff0000'><span style='color:#ff0000'>Red</span></span></span> Am I right in thinking that

How does Optimizely & Visual Website Optimizer handle visual DOM editing?

天涯浪子 提交于 2019-11-27 17:44:51
Optimizely & Visual Website Optimizer are two cool sites that allow users to perform simple A/B Testing. One of the coolest things they do is visual DOM editing. You can visually manipulate a webpage and save the changes offline. The changes are then applied during a random visitor page view via a JS load. How do the visual editors work? My name is Pete Koomen, and I'm one of the co-founders of Optimizely, so I can speak for how things work on our side. Let's say you want to create an experiment on http://www.mypage.com . You might (this is optional) start by adding your Optimizely account

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

帅比萌擦擦* 提交于 2019-11-27 17:24:04
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 Xhtml compliant and allow users to embed images etc. The only one I've used before is the FCKEditor , how well does this work with the MVC - has anyone tried...? My main requirements are: Xhtml compliance Deprecate (as best it can) when Javascript is disabled Modify the toolbar options Skinable (at least easily change the look and feel) Easy to use client side api Plays nicely with the ASP.NET MVC framework Edit: As Nick said, the XStandard editor is good, but

CKEditor: Class or ID for editor body

℡╲_俬逩灬. 提交于 2019-11-27 15:06:06
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 get to set the "accepted" checkmark in this question. Although that part of the API wasn't ported from

Updating textarea value with CKEditor content in Angular JS

为君一笑 提交于 2019-11-27 14:59:37
问题 I am using latest CKEditor (Standard Version) and based on this question , I have implemented an angular directive like this, var cmsPlus = angular.module('cmsPlus', []); cmsPlus.directive('ckEditor', function() { return { require: '?ngModel', link: function(scope, elm, attr, ngModel) { var ck = CKEDITOR.replace(elm[0]); if (!ngModel) return; ck.on('pasteState', function() { scope.$apply(function() { ngModel.$setViewValue(ck.getData()); }); }); ngModel.$render = function(value) { ck.setData

Wysiwyg with image copy/paste [closed]

醉酒当歌 提交于 2019-11-27 10:39:46
First, I understand that an image cannot be "copied" from a local machine into a website. I understand that it must be uploaded. I am a web programmer, and am familiar with common web wysiwyg tools such as TinyMCE and FCKEditor. My question is if there exists a program or web module or something of the sort that works will perform an automatic upload of images for a wysiwyg. I have a client that is constantly complaining about not being able to copy/paste documents with images from MS Word into a wysiwyg to create content on their website. I have looked into TX Text Control ( http://labs

make readonly/disable tinymce textarea

给你一囗甜甜゛ 提交于 2019-11-27 08:11:34
I need to disable or make readonly a tinymce textarea at runtime. 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); From version 4.3.x on you can use code below for readonly mode tinymce.activeEditor.setMode('readonly'); and for design mode: tinymce.activeEditor.setMode('design'); IF you only have

How to input text into tinceMCE editior using selenium/webdriver

痞子三分冷 提交于 2019-11-27 07:31:57
问题 I am trying to automatically insert some text using Selenium/Webdriver into a text box created using tinymce The text box is not a plain vanilla textbox so following is not working: System.out.println("Finding text input element"); WebElement element = inputWebDriver.findElement(By.xpath("//html/body/div/form/div/div/div[2]")); //not working //WebElement element = inputWebDriver.findElement(By.tagName("form")); // not working //WebElement element = inputWebDriver.findElement(By.id("tinymce"))