Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
283 views
in Technique[技术] by (71.8m points)

ckeditor4.x - Use HTML in ckeditor dialog form for custom plugin

I'm building a simple ckeditor plugin, i've almost everything in place but one thing: my button shows a dialog with 3 fields: title, label and tooltip.
With those fields i build a custom html element that more or less is done like this:

<my-tag label="MY LABEL"><span class="content"><span class=header>MY HEADER</span>MY CONTENT</span></my-tag>

i'd like to allow some HTML in my textarea in the plugin, just to set some bold/italic/lists and something like that.
At the moment when i build up the form i get the selected text and i'd like to place it in the textarea, so the user can format their tooltip in ckeditor and than build the tooltip.
In the textarea inside the dialog i can get the selected HTML by using getHTML() method, but obviously it's escaped when i submit that form.. is there a way to allow this thing? i'm aware that it can lead to some issues if they badly write the HTML, but anyway they already use the editor viewing the source time to time so in this case i think it's not a big issue...
Thanks!

question from:https://stackoverflow.com/questions/65672177/use-html-in-ckeditor-dialog-form-for-custom-plugin

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...