Ticket #5654 (closed New Feature: fixed)
Port 'Placeholder' to v3
| Reported by: | garry.yao | Owned by: | Saare |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.5 |
| Component: | General | Version: | |
| Keywords: | Cc: |
Description
Placeholder is one FCKEditor 2.x plugin that introduce a way to present none-editable content in wysiwyg mode, similar with 'fakeobject' but allow dynamic content.
Attachments
Change History
comment:5 Changed 3 years ago by garry.yao
- Status changed from review to review_failed
Let's update the menu icon, and for plugins that does not get into core, we need a sample page for it.
comment:7 Changed 3 years ago by fredck
- Status changed from review to review_failed
This is the typical case of "pure plugin" implementation, so let's leave the lang entries into the plugin directory as well.
comment:9 Changed 3 years ago by garry.yao
- Status changed from review to review_failed
The way of how plugin language files loaded is wrong, the plugin system has already 'well established' infrastructure for load lang files, check 'uicolor' as an example.
Besides, double-click should simply opens the placeholder dialog.
comment:11 Changed 3 years ago by garry.yao
- Status changed from review to review_failed
The 'doubleclick' processing is too simple that it doesn't fill up dialog correctly, in additional, please use the following lines as sample content:
<p>This is a [[sample placeholder]]. You are using <a href="http://ckeditor.com/">CKEditor</a>. </p>
comment:12 Changed 3 years ago by Saare
- Status changed from review_failed to review
The problem in fact was the detection of the element in the dialog.
comment:13 Changed 3 years ago by garry.yao
- Status changed from review to review_failed
I think the 'onShow' logic is over complicated, how about:
if ( isEdit )
{
var range = editor.getSelection().getRanges()[0];
range.shrink( CKEDITOR.SHRINK_TEXT );
var node = range.startContainer;
while( node && !( node.type == CKEDITOR.NODE_ELEMENT && node.hasAttributes('_cke_placeholder') ) )
node = node.getParent();
this._element = node;
}
comment:14 Changed 3 years ago by Saare
- Status changed from review_failed to review
As we talked, there is an unresloved edge case, but we can live with it for now.
comment:16 Changed 3 years ago by Saare
- Status changed from review_passed to closed
- Resolution set to fixed
Fixed with [6051].
comment:17 Changed 3 years ago by dinu
Reopen: accidental global var htmlFilter
plugin.js line 89: dataFilter = dataProcessor && dataProcessor.dataFilter; htmlFilter = dataProcessor && dataProcessor.htmlFilter;
There should be a comma instead of semicolon between them, or htmlFilter goes global.
comment:18 Changed 3 years ago by Saare
Thanks, fixed as a micro change with [6093].
comment:19 follow-up: ↓ 20 Changed 3 years ago by dinu
It's an easy hack to YUI Compiler to dump leaked vars, you could integrate in the build, especially easy since you have very few globals.
comment:20 in reply to: ↑ 19 Changed 3 years ago by fredck
Replying to dinu:
It's an easy hack to YUI Compiler to dump leaked vars, you could integrate in the build, especially easy since you have very few globals.
We use JavaScript Lint every once in a while, and always before producing releases. So this thing would get fixed. Thanks for the tip anyway.
