rich-text-editor

How to paste plain text in a Quill-based editor

ぐ巨炮叔叔 提交于 2020-02-21 12:00:48
问题 Quill (https://quilljs.com/) makes it simple to embed a quality text editor in a web page. When pasting html content in the editor, it filters the pasted html and then puts it into the text editor. My question is: How can I configure Quill so it pastes only plain text in the text editor? It would filter out all tags and leave the plain text only. The documentation about the Clipboard module (http://quilljs.com/docs/modules/clipboard/) says that it is possible to add custom Matchers to the

Remove sequential <br> in div filled by CMS users via rich text editors

时光怂恿深爱的人放手 提交于 2020-01-25 12:52:47
问题 I have div-area which is filled by CMS users and sends data via a rich text editor. How can I remove sequential br tags more than two in a <div> using jQuery? I tried parent() , closest() but it didn't work. For example, a CMS user added this HTML code using a rich text editor. <div class="cms-data"> <br> <span> <br><br><br><br><br><br> <a href="/uploads/755/a1.xls" target="_blank">xls</span></a> <br><br><br> </span> <br><br> </div> Edit: I added a class name to the <div> , cms-data. 回答1:

Quill JavaScript Rich Text Editor restrict tags

谁说胖子不能爱 提交于 2020-01-25 07:03:13
问题 I'm trying to use Quill JavaScript Rich Text Editor. I need to configure it to use only a predefined tag set: b, i, pre, a, br + Emoji Right now I have configured it in the following way: var Block = Quill.import('blots/block'); Block.tagName = 'PRE'; Quill.register(Block, true); var quill = new Quill('#editor-container', { modules: { toolbar: true }, theme: 'snow' }); As you may see I already have changed the wrapper to PRE tag. How to also configure Quill to use the mentioned restricted tag

Quill JavaScript Rich Text Editor restrict tags

隐身守侯 提交于 2020-01-25 07:03:12
问题 I'm trying to use Quill JavaScript Rich Text Editor. I need to configure it to use only a predefined tag set: b, i, pre, a, br + Emoji Right now I have configured it in the following way: var Block = Quill.import('blots/block'); Block.tagName = 'PRE'; Quill.register(Block, true); var quill = new Quill('#editor-container', { modules: { toolbar: true }, theme: 'snow' }); As you may see I already have changed the wrapper to PRE tag. How to also configure Quill to use the mentioned restricted tag

How to define CKEditor5 two-way converter with view defined as RegExp or function?

跟風遠走 提交于 2020-01-25 00:27:26
问题 I'd like to create plugin which allows on many values, which are considered as range not a list. So I thought, that I could use attributeToElement, but it seems to accept only specific values, which are kept in object, what is not possible for my case. I wonder how to define view elements with entire range of possible values (in my case colors). I thought about matching them with some sort of RegExp or function. How can I achieve that? 回答1: Actually it seems to be not possible to use

Primefaces textEditor: converting text to HTML with JavaScript not working

泪湿孤枕 提交于 2020-01-23 10:56:06
问题 At first let me state that this is my first question here and I am new in this community. Please be kind, do not hesitate to correct me, direct me to where I might find answers or study, etc. I am posting this question as a last hope for finding a solution as I have not found or come up with any by myself (nor with a help of my colleagues). Basically PrimeFaces p:editor is currently used at a page in the program I am working on. Users use it for entering and formatting text which is then send

TinyMCE is removing some part of html

只谈情不闲聊 提交于 2020-01-04 02:06:28
问题 I want to be able to insert empty div and span elements, text like [something], but when I save TinyMCE is removing all this code. Is there a config option that tells TinyMCE to return me the exact text I've entered? Thanks. 回答1: Yes, you need to change your valid_elements config option to somethin like // The valid_elements option defines which elements will remain in the edited text when the editor saves. valid_elements: "@[id|class|title|style|onmouseover]," + "a[name|href|target|title|alt

RTF Format in Web Text Editor

可紊 提交于 2020-01-01 05:34:11
问题 Is there a text editor on the web that supports input from RTF-formatted documents? I know it is a bit of an odd request for webdev, but I need to read RTF documents from the database and edit them in a web-based text editor and store it back in RTF. Before I invest too heavily in a conversion tool, I thought I would ask if any of the many web text editors supported RTF. My research is showing that they don't. Additionally, since this is an MVC 4.6 application, would it be a huge effort to

How to create a rich text editor [closed]

淺唱寂寞╮ 提交于 2019-12-31 08:06:54
问题 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 8 years ago . Hey all i want to know what is the concept behind creating the rich text editor. i mean how to create a rich text editor. I want to learn the implementation. PS: please donot suggest using YUI or any other built

How to create a rich text editor [closed]

吃可爱长大的小学妹 提交于 2019-12-31 08:06:35
问题 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 8 years ago . Hey all i want to know what is the concept behind creating the rich text editor. i mean how to create a rich text editor. I want to learn the implementation. PS: please donot suggest using YUI or any other built