当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript dom-globals.console类代码示例

本文整理汇总了TypeScript中@ephox/dom-globals.console的典型用法代码示例。如果您正苦于以下问题:TypeScript console类的具体用法?TypeScript console怎么用?TypeScript console使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了console类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

 const notifyTimeout = function (time) {
   const notification = tinymce.activeEditor.notificationManager.open({
     text: 'Timeout: ' + time,
     timeout: time
   });
   console.log(notification);
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:7,代码来源:NotificationDemo.ts

示例2: return

 onSetup: (api) => {
   console.log('onSetup ' + name);
   const box = Element.fromHtml('<div style="width: ' + width + 'px; background: ' + background + ';"></div>');
   api.element().appendChild(box.dom());
   return () => {
     api.element().removeChild(box.dom());
   };
 },
开发者ID:tinymce,项目名称:tinymce,代码行数:8,代码来源:FullDemo.ts

示例3:

 selector_converter: (selector, group) => {
   console.log('selector', selector, 'group', group);
   return {
     title: selector + '.AdvGroup',
     // NOTE: This is required so that it isn't disabled.
     selector: 'p',
     classes: selector.split('.')[1]
   };
 }
开发者ID:tinymce,项目名称:tinymce,代码行数:9,代码来源:ImportCssGroupsPluginTest.ts

示例4: return

 onSetup: (comp) => {
   // debugger;
   // TODO: TS narrowing, when config toggling = true
   // then the comp interface should include comp.toggleOn otherwise it should complain
   const state = DemoState2.get();
   console.log(state);
   comp.setActive(state);
   return () => { };
 },
开发者ID:tinymce,项目名称:tinymce,代码行数:9,代码来源:ToolbarButtonDemo.ts

示例5:

  onSubmit: (api) => {
    const data = api.getData();

    // tslint:disable-next-line:no-console
    console.log({
      id: data.id
    });

    api.close();
  }
开发者ID:tinymce,项目名称:tinymce,代码行数:10,代码来源:AnchorDialogSpec.ts

示例6: function

 const getCursorY = function (target) {
   /* The y position on the cursor for the viewer is a combination of y position of the editor frame and the y
    * y position of the target
    */
   const editorY = iframe.dom().contentWindow.document.querySelector('iframe').getBoundingClientRect().top;
   const targetY = target.dom().getBoundingClientRect().top;
   // tslint:disable-next-line:no-console
   console.log('editorY', editorY, 'targetY', targetY);
   return editorY + targetY;
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:10,代码来源:IosRealmTest.ts

示例7:

  onSubmit: (api) => {
    const data = api.getData();

    // Submit is only exectuted when the form has valid data
    console.log({
      code: data.color
    });

    api.close();
  }
开发者ID:tinymce,项目名称:tinymce,代码行数:10,代码来源:ColorPickerDialogSpec.ts

示例8:

  onAction: (api, details) => {
    if (details.name === 'char') {
      // Would log '@' if the At sign is clicked these values doesn't have to be part of the state model
      // tslint:disable-next-line:no-console
      console.log({
        char: details.value
      });

      api.close();
    }
  }
开发者ID:tinymce,项目名称:tinymce,代码行数:11,代码来源:CharmapDialogSpec.ts

示例9:

  onSubmit: (api) => {
    const data = api.getData();

    // tslint:disable-next-line:no-console
    console.log({
      language: data.language,
      code: data.code
    });

    api.close();
  }
开发者ID:tinymce,项目名称:tinymce,代码行数:11,代码来源:CodeSampleDialogSpec.ts


注:本文中的@ephox/dom-globals.console类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。